Perch Forms: Changing select options depending on users selections

  • Hi All


    Think I know already what the answer to this will be but I thought I'd check in with the hive mind first.


    I have a booking form on an already live site for an optician. The site visitor selects the preferred day they want their appointment and then can select a time and a preferred shop (there are two currently). The customer wants to be able to offer slightly different times for when they select different days e.g the Optician opens late until 7 on mondays at one shop and until 7 on tuesdays at a different shop... so if the customer selects monday and shop A, they can choose a different set of times.

    Pretty sure this is going to be out of the scope of the Forms app and I may need to re-do this with some custom code


    Here's my template code currently


    Any help would be greatly appreciated as I would like to keep using the forms app to process this particular form if possible.

    thanks


    Nik

  • so if the customer selects monday and shop A, they can choose a different set of times.

    This sounds like a front-end (Javascript) feature. You have 2 select fields and you want to disable some options of the second field based on the selected option of the first field.


    If you also need to do some server-side validation, you can write some custom form validators