Prefilled fields in a form

Hello,

I successfully created a form to save data, but once I tried to go up the next step by pre-filling up some fields to make easier the task to my users, those fields which were previously filled and not updated by the user are not saved as planned, the issue is specific for those fields.

Some highlights on the code below:

  1. I update the predefined date for Birth Date as 1/1/2000 and is working (saved to database)
  2. Going through the forums I applied the recommendation to include my code once the dataset is loaded.
  3. I included a console.log statement in the submit button (OnClick event) to debug the values prefilled and they are ok according to the required functionality.


4) I initially configured the 3 fields to show up the place holder text, in this case, the fields are saved as empty.
5) Then, I tried by changing it to initial text option with a default text value and you know what? the fields are saved as per the initial value configuration, my code is not considered.


6) If the user updates the prefilled fields, the updated values are saved.

It looks like I’m missing something to “commit” my prefilled values before to go through the saving step.

Any light on this issue is appreciated, I learned a lot during the weekend trying to figure out on this.

Thank you
Rogelio

1 Like

hello… i’m having the same issue, form fields get prefilled as planned but they’re empty when submitted… is there a correct way of doing this?

Also experiencing a similar issue. Has anyone been able to shed some light on this? Do the folks at Wix monitor this forum or not?