Conditionally fill empty form fields with default values
Good morning all.
I have an interesting situation where I want to conditionally pre-fill some hidden form fields IF they are blank for the record.
I know I can do this pretty easily a couple of ways:
- By always populating a temp field and then in Marketo once the form is submitted testing to see if the main field is empty, and if so, push the temp value into the main field.
- In Javascript. This doesn't work so well across devices however as you might not always get a pre-fill.
Both of these feel slightly like 'work arounds' and I'm feeling option 1. is the most stable and safe.
Am I missing an obvious and easy approach here?
Cheers