Title: Conditional Fields
Last modified: August 21, 2016

---

# Conditional Fields

 *  Resolved [kernel22](https://wordpress.org/support/users/kernel22/)
 * (@kernel22)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/conditional-fields-2/)
 * Hi there,
 * I’d like to show a group of fields on a signup form depending on a conditional
   field that the user needs to fill in.
    For example: A user can determine how 
   many friends he wants to register (1, 2, 3…) If he selects to register 1 or more
   friends, extra fields should appear, so he can write their names down.
 * I thought of using “$this->field->friends” in a template and getting the number(
   being friends an integer), so depending on what is selected I could show those
   extra fields (friend1_name, friend2_name, etc).
    However this info isn´t set 
   when the form is loaded so I guess I would need AJAX.
 * Could someone give me a hint of a way of doing this?
 * Thank you very much for your help.
 * [http://wordpress.org/plugins/participants-database/](http://wordpress.org/plugins/participants-database/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/conditional-fields-2/#post-4433707)
 * You’re right, this kind of thing has to be done with javascript. Check out the
   jQuery Accordion plugin, it’s perfect for this kind of functionality.

Viewing 1 replies (of 1 total)

The topic ‘Conditional Fields’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [Conditional Fields](https://wordpress.org/support/topic-tag/conditional-fields/)

 * 1 reply
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/conditional-fields-2/#post-4433707)
 * Status: resolved