[Nfb-web] Creating additional entry button for a form

Rachel Olivero rachel at olivero.us
Thu Apr 27 18:21:51 UTC 2017


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> 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
>  
> “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