CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Support both help_pre and help_post for profile fields
Pages: [1]

Author Topic: Support both help_pre and help_post for profile fields  (Read 1999 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Support both help_pre and help_post for profile fields
February 11, 2010, 04:01:10 am
A suggestion to improve profiles and add flexibility in achieving the desired layout on profile edit forms.

Custom fields have both help_pre and help_post.
Profile fields have only help_post, leading to nasty template hacking to get the relevant help text displaying in the right places.

Also when first creating a profile field from a custom field, it would be good if help_pre and help_post were pre-filled from the custom field's help_pre and help_post.

Dave J

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Support both help_pre and help_post for profile fields
February 11, 2010, 07:57:11 am
Discussed on IRC:

Feb 11 15:38:27 <dlobo>   hey davej_
Feb 11 15:38:33 <dlobo>   any chance u can work on a patch for
Feb 11 15:38:37 <dlobo>   http://forum.civicrm.org/index.php/topic,12159.msg52210.html#msg52210
Feb 11 15:40:04 <davej_>   Hi dlobo, thought you might kindly invite me to do that! :)
Feb 11 15:40:30 <dlobo>   dai'm so predictable :) open source involves a lot of begging/pleading/cajoling/threatening

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Support both help_pre and help_post for profile fields
March 23, 2010, 09:25:35 am
Any chance of getting the schema change for this into 3.2? I.e. add help_pre field to civicrm_uf_field. Once that's in, the code changes should be doable.

Dave J

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Support both help_pre and help_post for profile fields
March 23, 2010, 01:19:53 pm
Would be good if we could work in the option to have these show on Profile Searches. I think Eileen has provided some code for achieving the above, but would be good to have it in core. Do I need to go dig it out?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Support both help_pre and help_post for profile fields
March 23, 2010, 03:30:15 pm
I think we'd need another property (schema column) for each help item to indicate whether it should show in search forms 'also', or not.  Dave J and others, would this be useful to you (and if so would you consider including that in your patch)? Or Dave J and Peter / Eileen can collaborate on that work :-)
Protect your investment in CiviCRM by  becoming a Member!

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Support both help_pre and help_post for profile fields
March 24, 2010, 05:52:53 am
Hi Peter,

D'you mean per-field help text or per-profile?

We often want to display per-profile help text on a profile search form, which we do by modifying the template to include the profile's help_pre &/or help_post text.

Something to consider is that text appropriate for a create/edit form may not be appropriate for a search form. Having the option to include the text or not on search forms would go some way to addressing this but there may be use cases where different text is wanted for create/edit versus search forms. To achieve this, we'd be looking at help_edit_pre, help_edit_post, help_search_pre and help_search_post. Which is possibly overdoing it for per-field help.

Thinking back to requests we've had, I'd say:
(a) per-profile:
 - separate help text for search vs edit, or (slightly less preferred) option to include the edit help text on the search form, would be useful.
(b) per-field:
 - separate or optional help text for search isn't something we currently see a need for.

To avoid this mushrooming, since my original post was about per-field help text (not per-profile), I suggest we restrict this topic to per-field. I've created an issue for this: http://issues.civicrm.org/jira/browse/CRM-6004

We could get another topic/issue going for per-profile help.

And since we don't have a use case for per-field help text on search forms, I'm inclined to keep it simple and just add help_pre to civicrm_uf_field. If others have a use case for separate/optional per-field help text for search forms, feel free to post and contribute.

Dave J

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Support both help_pre and help_post for profile fields
March 24, 2010, 12:04:30 pm
HI davej - the client we have both worked with was the one that needed help per field for a search profile. Recipe is here as a patch. http://forum.civicrm.org/index.php/topic,12624.0.html

I agree about the 'if you want this for search and create profiles' and wanting to avoid too many options - but if it comes down to being able to turn the help per-field on/off for each scenario then it is as simple as cloning the profile and having one set up for Create and the other for Search.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Support both help_pre and help_post for profile fields
March 25, 2010, 05:08:58 am
Hi Peter,

Eileen indicated in that post: "I hesitate to submit it as a JIRA issue because it could have some unexpected effects on people who already had multi-functional profiles". I agree, I think it's a useful contribution best applied as a template customisation where needed. If it went into core than as Eileen and Dave G said, it would need extra db & form fields to indicate whether the text should appear on search forms. I don't see the extra complexity and time as worthwhile when there's a good solution out there already (Eileen's). But, as Lobo would say, feel free to contribute this!

The change I originally proposed, separate pre_help & post_help, is something that cannot be achieved by template customisation without very unpleasant hackery.

Regards,

Dave J

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Support both help_pre and help_post for profile fields

This forum was archived on 2017-11-26.