Allow to set a default value for empty fields in Webforms

Hello Catalytic Team,

I have some use cases where it would be really helpful to define a default value for fields in Webforms that were not populated by the User.
In the past I created a work around with a small java script that checks if fields are empty and if replaces them by custom strings depending on the field.

This is not really feasible in bigger scale and also methods like includes() do not work in the editor and the "" check is not consistent(at least in my experience).

Tagged:
1
1 votes

Swept · Last Updated

Comments

  • Did you know if you make the field 'required' then the form CANNOT be submitted until the user fills in that field. Would that work better?

  • Daan_Koser
    Daan_Koser Posts: 2
    edited February 2021

    Yes but in my case I want the User to submit a Webform even tho he did not fill all fields.I mainly face this problems with contract filling bots where the user sometimes needs to see context of the variable and therefore should be able to leave it blank and fill it afterwards in the file.

    Problem is that the empty Webform field also "deletes" my variable name(because its an empty string) in the file so the user can no longer identify where he has to add the input he left blank.
    Perhaps this case is to special to invest time into it but thanks for your comment:)