Hey @MiguelOrtiz, thanks for the reply. Here are the answers to your questions.
- I am not using a datasource to prepopulate the form. The form is used only to enter new records.
- I am not using a variable to prepopulate the form.
- Once the form has been submitted, I try to trigger the confetti as a way of showing the user it was successful, and I trigger the query to refresh the table so they can see the record was added.
- Here is the insert query:
INSERT INTO
insurance (
dealer_name
notes,
brand,
dealer_state,
new_da,
dealer_email,
liability_coverage_per_occurrence,
liability_expiration_date,
gl_status,
auto_liability_coverage,
auto_liability_expires,
al_status,
umbrella_liability_coverage,
umbrella_liability_expires,
workers_comp_coverage,
workers_comp_expires,
additional_insured,
certificate_holder,
insurance_company,
insurance_agent,
agent_email,
pdf
)
VALUES
(
{{form13.data.dealer_name}},
{{form13.data.notes}},
{{form13.data.brand}},
{{form13.data.state}},
{{form13.data.new_da}},
{{form13.data.dealer_email}},
{{form13.data.liability_coverage_per_occurrence}},
{{form13.data.liability_expiration_date}},
{{form13.data.gl_status}},
{{form13.data.auto_liability_coverage}},
{{form13.data.auto_liability_expires}},
{{form13.data.al_status}},
{{form13.data.umbrella_liability_coverage}},
{{form13.data.umbrella_liability_expires}},
{{form13.data.workers_comp_coverage}},
{{form13.data.workers_comp_expires}},
{{form13.data.additional_insured}},
{{form13.data.certificate_holder}},
{{form13.data.insurance_company}},
{{form13.data.insurance_agent}},
{{form13.data.agent_email}},
{{form13.data.pdf}}
)
- I do not have any events triggered by the insert query, although I was wondering if I should have the confetti and the refresh query triggered after the insert is successful. The problem there is anything I put in the event handler for success never seem to fire.
Here is a screenshot of the database I am using:
Here is a screenshot of the page with the insert record form. As you can see, there are a number of fields that already have values in them, but I did not set it up that way. I want all the fields to clear once the form has been submitted.
Last but not least, here is a screenshot of the setting for the form.
I have been really struggling with this. I had to change my date fields to text fields because I cannot figure out how to insert a null value through the form, then I had all the other problems I listed above, so any help you could provide would be most appreciated.
Please let me know if you need any other information.