Form for a new record. Clear results except for 2 inputs

I have a New operator button and on click it goes to the form. Right now the method is clear (on control component)so it doesn't link to the table selected row but this negates the default value in id and operatorID. How do I clear the results of the form except for these 2 values or set them after they are cleared?

Default value1 for {{formOperators.data.id}} should be {{ uuid.v4() }}
Default value2: {{formOperators.data.operator_id}} should be {{ Number(getMaxOperatorId.data.max[0]) + 1 }}

Hello @Shawn_Optipath

I'm not sure I understand your issue, but you can set default value for the form inputs and then reset the form instead of clearing it. That way the field that have empty default values will go back to being blank, and the ones with default values will go back to their respective default value.


image

1 Like

Thank you. That gave me an idea to clear the selection the the linked table to the form and the reset the form.