I have dropdown with option1, option2 ... Other. I want if user selects "Other" another text field appears (slideDown) underneath the dropdown AND this text field is Required. Is it possible with civiCRM?
3 Answers
This was proposed as a feature for CiviCRM, but it never really got any funding: 'Other' option for custom fields
As Ben says, if you are (or have access to) a developer, it's not too hard to write this extension. Add both the dropdown and the "Other" field to your profile, then use jQuery to hide the "Other" field. Toggle whether it's hidden based on the value of the dropdown.
Use hook_civicrm_validateForm to set "Other" as required if the dropdown value matches the "Other" option. By default it should not be required.
Are you using Drupal? If so I think webform will support this.
-
1The question has a tag - "Wordpress". Is it possible with civiCRM/Wordpress ?– StoychoMar 6, 2016 at 21:26