Very simple question, but I was not able to find an answer: when working with a form embedded on a webpage, can I hide a mandatory field and still allow the visitor to submit the form, without changing the form in the backend?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @floriana_guardi ,
The best possible solution for this would be hiding the mandatory field and filling in some dummy values in that mandatory field using JS which will not be visible to the end user but it will allow them to submit the form.
I hope it helps.
Best regards,
Vaibhav Mathur
This would be problematic. While Adobe Target could be used to hide or remove said form fields using CSS or JS, if the form is configured to require those fields on the backend, simply hiding them on the front end wouldn't allow submission unless there's additional intervention to bypass validation. Mandatory fields are usually required for a reason (i.e. compliance, business logic, etc.), so removing them could result in incomplete or inaccurate data collection. If not handled properly, visitors might encounter unexpected validation errors when trying to submit the form.
Views
Replies
Total Likes
Hi @floriana_guardi ,
The best possible solution for this would be hiding the mandatory field and filling in some dummy values in that mandatory field using JS which will not be visible to the end user but it will allow them to submit the form.
I hope it helps.
Best regards,
Vaibhav Mathur
I'd be very careful of hiding the fields and inserting "dummy values" because if these fields are mandatory, it's likely because the business relies on them for processing, reporting, compliance, or personalization. Dummy values could have the unintended consequence of corrupting the dataset, making analytics, automation, and decision-making unreliable.
Views
Replies
Total Likes
Thank you for the feedback, those are all very good points!
In our case, we're working with the form owners directly: they want to A/B test the impact of removing certain mandatory fields to understand if the benefits of simplifying the flow offset the drawbacks of not having that info in the CRM upon first form submission (they could be added in a second step after a form lead is qualified). It's also a new CRM system, so we're still in the initial phase, and we don't have automated processes that could be impacted.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies