#how to control when all fields are empty
1 messages · Page 1 of 1 (latest)
Hi There!
Thanks for reaching out to us. One of our engineer will be with you shortly.
If you are stuck with an issue/error, please help us with following information.
- Which version of Appsmith are you on?
- Provide screenshots/screen recordings of the original error/code snippet.
- Add details about your use case and provide steps to reproduce the issue, if
possible.
i need to know if thers any option to control when a modal is empty show a error message (customized) and avoid creating a empty record on mysql
Hi! Sorry for the late reply. For the first issue, you could use a form and make
the fields “required” or you could create a JS function inside a JS
Object
that validates the data before submission.
For the second issue, this documentation on the [Select
widget](https://docs.appsmith.com/reference/widgets/select#displaying-data
[https://docs.appsmith.com/reference/widgets/select#displaying-data]) should
help.
Let us know if you face issues or have more questions.
JavaScript(JS) is a programming language used on both the client and the server-side. It also supports the creation of an object known as JavaScript Object (JS Object). Javascript object is a collection of properties designated by a key-value pair. In this guide, you’ll learn how to use JavaScript(JS) objects within Appsmith.
Select / Dropdown widget is used to capture user input/s from a specified list of permitted inputs.
hi, the first issue is not fixe by setting required fields,
i already have my fields required
also i got my mysql fields as not null
You need to turn off the Disabled Invalid Forms property.
Also, check this doc:
https://docs.appsmith.com/reference/widgets/form#disabled-invalid-forms
A Form is the most widely used way of capturing a user’s digital or handwritten information. Keeping this in mind, Appsmith provides a form widget that caters to all your needs to capture the user input and wire it to a database query or an API.
i did turned off that property from Save button but still
i tried with both disabled invalid form enabled an disabled
Can you share a screenshot of the query and it’s Settings tab?
thats save product query
and settings
see all my fields are required but still saving empty records on mysql
i tried form without modal and everything works as expected
may be a issue with modal and those kind of things?
You would need to move those Input fields inside a form. Otherwise, you can
create a custom JS function that validates the entries before the query gets
run.
thank you, ticket may be closed