This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] Select a second form based on a multiple choice field


  1. adrianwilliams
    Member

    I have to say, Machform is great. Support from Yuniar is second to none.
    Back to the question - I have a form with one field - an option field with four options, form1, form2 form3,form4.

    When I submit the form, can machform select one of the forms based on the selection made by the user ?

    Posted 17 years ago #
  2. yuniar

    Hi Adrian,

    Unfortunately, MachForm doesn't support this feature yet.
    This is a great feature indeed as many other users already asked about this too.

    Eventually, multiple page forms and logic/branching will be implemented. But at this moment I can't promise you on which version.

    Thanks


    MachForm Founder

    Posted 17 years ago #
  3. mpivon
    Member

    Just a note that this functionality can SORT OF be accomodated in the existing system, however, it requires creating a separate form for each instance, and it would only be practical for very small projects.

    Here's how -

    Assuming you have a form that wants to Poll Men and Women differently:

    1. Create two forms: Form 1 and Form 2 - Form 1 is "Men", Form 2 is "Women".

    2. In each Form, create a Radio Button area (aka: Multiple Choice)

    3. Make the default value of Form 1 to be "Men"

    4. Make the default value of Form 2 to be "Women"

    5. In the FORM PROPERTIES area for each form set the DESCRIPTION to be the Question that you would ask the user. i.e.: "If you are male, please click here" for Form 1, and "If you are Female, please click here" for form 2.

    6. HIDE the properties of each field on both form 1 and 2 so that it is visible only to an administrator. This way, when a user sees the question, they will only see the Submit Button. Since you set the default value to "Men" on this field, it will redirect to the "Men" Form... and likewise for the "Woman" form. (Users will still see the submit button because it is not a component of the Hidden Field, but rather a component of the Form.

    7. Set the value of Form 1 to redirect to a specific URL (or, in this case, another Machform) if it is selected -- let's say http://www.YourMachFormInstall.Com/view.php?id=1 which is the form for "Men"

    8. Set the value of Form 2 to redirect to a specific URL (or, in this case, another Machform) if it is selected -- let's say http://www.YourMachFormInstall.Com/view.php?id=2 -- which is the form for "Women".

    9. Copy the Embed Code / Integrated Form / IFRAME Code from Form 1 AND Form 2 into an HTML page.

    10. Now you have a form that is, effectively TWO forms on one page. When someone clicks on the first form (by clicking Submit) they will be redirected to the URL that coincides with the "Men" form. When someone clicks on the second form (by clicking Submit) they will be redirected to the URL that coincides with the "Women" form.

    Admittedly, it's not perfect, but it can be done if you're in a bind.

    Anyways, it worked for me... :-)

    Posted 17 years ago #
  4. yuniar

    Oh wow.
    That's pretty detailed instruction.

    Great idea you got there. Thanks for sharing this!
    It's always a pleasure to see people being creative with MachForm ;-)


    MachForm Founder

    Posted 17 years ago #
  5. adrianwilliams
    Member

    I agree - what a solution !
    I found a slightly different way - I created a web page with 4 options - each with a hyperlink to a separate form. Luckily i didn't need a form at this stage. I do like the solution by mpivon if the option has to be in the form. :)

    Posted 17 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.