[Nfb-web] Creating additional entry button for a form
Brian Mackey
bmackey88 at gmail.com
Thu Apr 27 18:27:06 UTC 2017
What I am trying to do is have a registration form set up so that one individual can submit the same form for multiple individuals for one submission.
For example, I am submitting a form and want to add a family member so that we are registered at the same time (similar to how it is done for the national convention registration form.
I am trying to do this research in advance of purchasing the Gravity Form license for NJ since the first form we will be creating will be for this year’s state convention.
From: Rachel Olivero [mailto:rachel at olivero.us]
Sent: Thursday, April 27, 2017 2:22 PM
To: bmackey88 at gmail.com
Cc: nfb-web at nfbnet.org
Subject: Re: Creating additional entry button for a form
Brian,
It sounds like what you're going to need is to add custom JavaScript and override the submit button's default handler. I'm not sure you've described your use case, so I'm inferring here, but it sounds like you want to allow someone to add a field to the form and change its value. When the user submits the form you want a single entry to be recorded with all the "master data" plus the one field modified for each entry. As an example:
* purchasing raffle tickets and allowing the user to choose their own numbers
* the user can fill out their name, address, etc one time
* they are first given one entry field for the number they want
* an add button would insert another field for each additional number they want
* when submit is activated, individual entries are added to the database fir each number.
This, as opposed to having a single entry with each number somehow recorded in a single submission.
If I'm not on the right track here, please advise what your use case is.
In the outlined scenario you could use JavaScript to insert the additional fields. Then modify the backend script to parse for multiple entries and handle them as desired. You could also handle each submission through an Ajax call, but that doesn't support the philosophy of progressive enhancement.
Rachel
Sent from my mobile phone. Pith is intentional, typos or perceived abruptness are not.
On Apr 26, 2017, at 16:50, Brian Mackey <bmackey88 at gmail.com <mailto:bmackey88 at gmail.com> > wrote:
Greetings to all,
I have found a plugin to add additional buttons to a form created with Gravity Forms. Now my question is, what coding is needed so that I can add another entry to the current one before the primary entry is submitted? The plugin that I have allows me to add a submit button that can be customized with CSS code. If anyone can assist I will greatly appreciate it.
Thank you.
Brian A. Mackey
Brian A. Mackey
Owner, Mackey Enterprises, LLC
Treasurer & Webmaster, National Federation of the Blind of New Jersey
Member, National Federation of the Blind (NFB) Blind Users Innovating & Leading Design (BUILD) Team
609-953-6988
Bmackey88 at gmail.com <mailto:Bmackey88 at gmail.com>
“Happy are those who dream dreams and are willing to pay the price to make those dreams come true”
-Vince Papale
More information about the NFB-Web
mailing list