Support » Plugin: Participants Database » Conditional Fields

  • Resolved kernel22

    (@kernel22)


    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/

Viewing 1 replies (of 1 total)
  • Plugin Author xnau webdesign

    (@xnau)

    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.