Add additional form by clicking a button

Issues related to forms.
Post Reply
christrentrsa
 
 
Posts: 28
Joined: Tue Jun 02, 2020 10:04 am

Add additional form by clicking a button

Post by christrentrsa »

Hi everyone

Please could someone guide me. This is my scenario:

I have a site created for people to submit various kinds of reports under different categories (by completing forms).

Is it possible and how do I create a button that displays a specific form when clicked. I know that you can't have multiple forms on one page so basically, it would be sections.

So, let's say for example, the user needs to submit two safety incident forms, what I need is the user to click a button which will display the first form. If they click on add new, it will display another form (basically a copy of the first form) on the same page. If they click delete, it deletes that one form (or section), leaving only the first one, if that makes sense.

I have found a way to do it via events on the button and showing and hiding layout grids but it seems very labour intensive. Is there an easier way?
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Add additional form by clicking a button

Post by Pablo »

There is no standard solution for this, because this is a very specific requirement.
So, this will require a custom script.
bkjohns
 
 
Posts: 296
Joined: Wed Nov 14, 2018 5:54 pm

Re: Add additional form by clicking a button

Post by bkjohns »

Are you requiring a form because you want to get an email with the completed info? If you don't require an email perhaps one of the MySQL extensions (MySQL Connector V2 - paid for example) would work. It allows for creating new records (reports to you) that you as Admin could view.
Just a thought.
christrentrsa
 
 
Posts: 28
Joined: Tue Jun 02, 2020 10:04 am

Re: Add additional form by clicking a button

Post by christrentrsa »

Thank you for the feedback and suggestions.

Yes, I will require the forms to be emailed. Ill do some research and maybe I can achieve it with code outside of web builder although it's not ideal. I have the paid my sql crud extension.
alan_sh
 
 
Posts: 1752
Joined: Tue Jan 01, 2019 5:50 pm

Re: Add additional form by clicking a button

Post by alan_sh »

It may not be what you are looking for, but I use cognitoforms (www.cognitoforms.com) to build the forms and then embed the form using an HTML object.

That has features where you can display other things if a certain option is chosen.

Alan
christrentrsa
 
 
Posts: 28
Joined: Tue Jun 02, 2020 10:04 am

Re: Add additional form by clicking a button

Post by christrentrsa »

Thanks Alan, I'll try that :D
Post Reply