HTML post data
-
Dear all,
I use HTML in my form, when the field is left blank the post data shows ‘0’ in the submitted form. Is it possible to show nothing in the post data when the field is blank?
-
Hi @yanickschipper,
Thank you for contacting us.
Could you please confirm if the 0 value is showing for all fields or just the HTML field? Also, can you share the page URL of where you have the form in order to view the setup?
Lastly, did you notice the 0 value in the submissions section or in the email notification you are getting with each submission?
Best,
Jonathan SHi Jonathan,
I have placed the example form here: https://ypstravel.nl/boekingspagina
0 is showing for the HTML fields only that are left blank and only in the e-mail notification.
I have read this: https://premium.wpmudev.org/forums/topic/forminator-notofication-email-contains-blank-field-titles/ however this only works with {all_fields} and I don’t want to show all fields in the confirmation e-mail for my customers.
Hello there @yanickschipper
I feel a bit lost here. The HTML fields cannot get user data, they are only displaying info. So not sure how to reproduce this, which field exactly shouldn’t be submitted in your form?
Finally, as we need to check the email content, could you please export your form and share it here with us? You can use a service like Dropbox or Google Drive.
https://premium.wpmudev.org/docs/wpmu-dev-plugins/forminator/#import-exportThank you,
DimitrisDear Dimitris,
You should know that it is a booking form. So there is an option to add the details of 9 passengers. When for example there are only 5 passengers, the confirmation e-mail shows:
NAME1
NAME2
NAME3
NAME4
NAME5
0 0 0
0 0 0
0 0 0
0 0 0When the customer leaves the fields blank for passenger 6-9 then I would like not to show those fields in the confirmation e-mail instead of the zeros.
You can find the exported form here: https://drive.google.com/file/d/1pFFTsvxHLqs7YvDoGQP4kQ7g2b4R3ETt/view?usp=sharing
- This reply was modified 3 years, 1 month ago by yanickschipper.
I hope you can offer something similar to Contact Form 7 and other forms that have this option: “Exclude lines with blank mail-tags from output”
That would be really helpful!
Thank you for the form.
I was able to replicate the issue, there is a similar situation reported and we are adding this ticket as one extra report.
The Forminator should exclude by default the empty fields and it seems a bug from 1.14.8 version.
I’m afraid we can’t give an estimated time to release the fixed version, a workaround as you know the number of fields ( max 9 ) is duplicate the Emails and use the Email Conditional then edit the email content to match that conditional.
For example.
if passenger == 2 {select-1} {name-1} {date-1} {select-2} {name-2} {date-2}
Kindly keep the plugin updated and eyes on the changelogs.
Best Regards
Patrick FreitasHi Patrick!
Thanks for checking and that’s actually not a bad idea at all 😉 I have duplicated the e-mails and it works fine by now, thanks!
Thank you for the update.
We already reported to the plugin team, we are marking this as resolved for now, however, feel free to ping us any time you need.
Best Regards
Patrick Freitas
- The topic ‘HTML post data’ is closed to new replies.