We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    I have a page which displays an availability calendar for holiday properties. The page uses two forms. The first form allows the user to navigate through the calendar back and forth. It’s a simple form with only three buttons: forward through time, backward through time and back to current month. The second form allows the user to select an arrival date from the calendar and the duration of their holiday and a button to submit and complete a booking on a follow-up page.

    According to the docs, Formit is capable of handling multiple forms on a page by using the submitVar parameter. I’ve added a unique, hidden variable to each form and a reference to each in the appropriate Formit call via the submitVar parameter, however as soon as I activate both forms the Formit calls no longer work. When used individually - one form disabled - they work as expected.

    I have the following Formit calls, for navigating:

    [[!FormIt?
      &hooks=`navigateCalendar`
      &submitVar=`calendarNav`
      &redirectTo=`16`
    ]]
    


    ... and for validating the dates:

    [[!FormIt?
      &hooks=`validateDates`
      &submitVar=`booking`
      &redirectTo=`17`
    ]] 
    


    Any idea what I’m doing wrong?

    Thanks.
      MODx Revolution / MAMP / OS X
      • 27519
      • 275 Posts
      Ouch, please ignore. My fault due to crappy Javascript... embarrassed

      Formit works a charm.
        MODx Revolution / MAMP / OS X