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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Let form user add extra fields


  1. Maurice
    Member

    In some forms we want the user to be able to add extra fields lets say
    ad name of friends and with a plus + button add extra names and with a Minus button - remove theme.

    is this possible? in machform3 ?

    Posted 11 years ago #
  2. DaveVoss
    Member

    One way to accomplish that using Form Logic is to decide on the maximum number of friends that you want them to add -- Lets say that is 5. Create a Multiple choice field with optoins nuimbered from 1 - 5 with instructions for them to select how many friends they want to submit. Create 5 Name fields and make each one hidden. Then use page logic to show the name fields depending upon the number of friends they select in the Multiple Choice field. Be aware that the "numbers" in the multiple Choice field are really text, not part of a number field. Hope that helps.

    A variation is to substitue the Multiple Choice field with a number field with a range limit for what they can enter. That way in the form logic you can use the "<" and ">" comparators which greatly reduces the amount of logic you have to use. I just think that the Multiple choice looks cooler and maybe more professional even if it is a lot more work.

    Posted 11 years ago #
  3. DaveVoss
    Member

    Oh, and no, you cannot add fields dynamically while filling out a form. I didn't think to give you a direct answer first.

    In my solution above, it will appear to the user that they can remove friends from their list by selecting a lower number of friends. Those friends' names would disappear on the form he is filling out, but they will still be listed in the database. When you look at the form's entries you would have to pay attention to the entry in the number field.

    Posted 11 years ago #
  4. Maurice
    Member

    Thnx Dave going 2 give it a try

    Posted 11 years ago #

RSS feed for this topic

Reply