Forums

form with 2 buttons submit

prince25 25 Jan, 2019
In a form I have to insert 2 submit.
1 = upload
2 = sending email.
How do I setup / submit to manage the two pulses of the designer ??
I thought about assigning a value to the fields of the submit buttons ... but which ??
and how to set up the setup / submit?
Thank you
GreyHead 25 Jan, 2019
Hi Prince,

I don't fully understand your question, please can you explain with some more detail.

You can give submit buttons different names and read those after the form submits.

Or you could perhaps ad radio buttons to specify which action is needed and use an Event Switcher on Submit.

Bob
prince25 25 Jan, 2019
Sorry ...... I'll explain better:
I created a form for uploading files ... everything is ok!
I would like to add a contact form to the same forms.
My question is: can the two "buttons" coexist on the same forms: "charge" and "send"?
Their actions are not linked, I can click the "upload" button and upload the files and do not click the "send" button.
Vice versa, I can click the Send button and not the Upload button.
And if they can exist, do I have to apply particular rules in the Setup / submit?
Sorry my English, I'm Italian, I use google translate
Thank you
healyhatman 25 Jan, 2019
The files will still try to upload from the user's computer to your website, your website just won't do anything with them afterwards. You're better off doing what Bob said probably - have a radio selection. Choose one and it shows the file upload fields, choose the other and it shows the contact fields.

If you absolutely MUST do it the way you're saying, then 'name' the buttons both "action" and set their VALUE to for example file_upload and contact. Then use an event switcher in your submit event to check for {data:action}, do one thing for "file_upload" and another thing for "contact"
prince25 25 Jan, 2019
Ok, I think it's better to do what Bob said.
The problem is .... I've never created a radio selection.
Can you give me some help for my designer side case and setup side?
Thank you very much
prince25 25 Jan, 2019
Hi,
So ....I know I tried to create a radios group form.
IN DESIGNER I created two containers pag_2 and pag_3.
In One I entered the radius group and a button, in pag_2 the field to load the files and a button, in pag_3 the fields for the contact and the button fig. 1
Radios group I set it as in fig 2.
IN SETUP I inserted an envent switch (set as in fig.4) and I have inserted in pag_2 and pag_3 the modules for the upload and the email (fig3).
I inserted in pag_2 and pag_3 two display modules set as in Fig 5 (for pag_2)
Something is wrong ... the two modules are somehow ok (upload uploads files and emails send messages) but it's ... a mess.
If I choose pag_2 (Upload file) I have fig 6.
If I choose pag_2 (Send message) I have the screen Fig.7
Help ?????






healyhatman 25 Jan, 2019
Just look at the field events demo
This topic is locked and no more replies can be posted.