What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Can I Add placeholder text to empty fields?Asked by johnboy666 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?
You could add a default value to each field.
Though, this would show the default value in the form, rather than the hint text.
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.
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.
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.
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.
Ah I see - That's a good idea, I'll give it a try and report back.
Thanks very much!
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.
I'm sorry that it couldn't work for you.
If you need any help from our side, please let us know.