151 Posts
jimenaes
8 years ago
6
Topic

Hello

I have an email field in my form but a just want it to send the email when a button is pressed, is there any way to do this?

thanks

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
0
Level 1

That would most likely require some custom coding, email in seblod is sent on saving of the form. You could create save button with label send email, but email would also get sent when you would save&close the form, so you would still need some custom code to check if email has been sent already.

8 years ago
1
Level 1

Hi,

Thanks Klas!

@jimenaes, a solution is to add a checkbox button "Send email", use the code plugin to send an email after store if checkbox is checked.

151 Posts
jimenaes
8 years ago
0
Level 2

Hi, thank Klas and Bes. I do have the code plugin but I don't know how to use it to trigger the email field with all its settings, could you give me some clues?

4229 Posts
Kadministrator
8 years ago
2
Level 1

We first need to figure out what exactly you want, if having a button to send email after save (e.g. radio field with yes/no) is enough, then you can also use conditionals to enable/disable email field

151 Posts
jimenaes
8 years ago
1
Level 2

Thank Klas, I tried that but somehow it dosen't works. I have a checkbox field with two options. I set the conditional to the email field: this field is enabled if checkbox field is filled with option 2. But de emails is not sent.
 What I'am doing wrong?

4229 Posts
Kadministrator
8 years ago
0
Level 3

there can be many reasons for this, first try if email is actually sent without any condition. If it works without condition, check if conditional changes disabled state. isFilled is not right conditional for checkbox, it only works with text fields, you need to use isEqual

Get a Book for SEBLOD