- johnboy666Asked on June 07, 2016 at 11:40 AM
I have a form in use that does NOT require the user to complete every field and I'd like to keep it that way.
BUT - Fields that are left empty are causing issues further down the line when I import into my Wordpress database.
Is it possible to automatically add a "-" or similar to all empty fields when user clicks Submit?
- JotForm SupportdavidAnswered on June 07, 2016 at 01:03 PM
You could add a default value to each field.
Though, this would show the default value in the form, rather than the hint text.
- johnboy666Answered on June 09, 2016 at 04:44 AM
Thanks for this. I did wonder about that but was hoping to keep the placeholder text.
Having said that - I wonder if it was some kind of jotform bug as yesterdays forms all came through O.K.
- JotForm SupportMike_GAnswered on June 09, 2016 at 06:54 AM
If I'm not mistaken, even if there is a placeholder, but fields are left unfilled and it is set as required, the form will still not submit. And, there is no option or condition to retain the placeholder text during submission. There is, also, no option available to fill empty fields during submissions nor there is a condition that will affect the behavior of the submit button and fill empty fields when it is clicked.
With regards to what you said that happened yesterday, were you able to submit your forms with empty fields but it was filled automatically during submission? That seems odd because of what I have explained above. I'm not sure what happened, but if you encounter the same, please feel free to contact us anytime with more details.
- johnboy666Answered on June 09, 2016 at 07:08 AM
Yes I was able to submit forms because the fields in question are not set as "required" and I'd like to keep it that way as not every field is required by all my users.
However - Because I'm sending post data to Wordpress which uses that data to create a post/page on my website...
This left me with an issue that meant the post/page was not created properly.
I'll keep an eye on this and see how it goes over the next few days.
- JotForm SupportNik_CAnswered on June 09, 2016 at 08:55 AM
What crossed my mind is that you could possibly use email submission for adding, for example: - . What I'm thinking is to edit your Notifier email and add - for every field, or at least for every not required field:
You will get something like this in your email:
Now, I'm aware that, this will add the - sign even if there is some text in it, but I'm not sure if this could work for you?
Please let us know what do you think.
- johnboy666Answered on June 10, 2016 at 11:11 AM
Ah I see - That's a good idea, I'll give it a try and report back.
Thanks very much!
- johnboy666Answered on June 17, 2016 at 05:51 AM
Just to update you - I have tried this but unfortunately it hasn't worked.
I'm now thinking the issue is not with empty fields but some kind of coding problem.
Unfortunately I'm not a developer so will have to get this looked at by a pro.
- JotForm SupportNik_CAnswered on June 17, 2016 at 08:59 AM
I'm sorry that it couldn't work for you.
If you need any help from our side, please let us know.