Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation of validateAndUpdateUI() vs validate() #65

Open
justdan0227 opened this issue Sep 30, 2021 · 3 comments
Open

Explanation of validateAndUpdateUI() vs validate() #65

justdan0227 opened this issue Sep 30, 2021 · 3 comments

Comments

@justdan0227
Copy link

Can you provide an explanation of the two in the documentation? Thanks!

@neoneye
Copy link
Owner

neoneye commented Oct 1, 2021

Invoking form_installSubmitButton() and a "Submit" button gets shown in the navigation bar. It shows an alert with validation status. The form_installSubmitButton() can used during development for validating the form.

When the form actually have to be submitted to a server or similar, then one will have to make a custom function for uploading to the server.

@justdan0227
Copy link
Author

Oh I'm so sorry.. I didn't explain my question. I have a submit button that when pressed I call

formBuilder.validateAndUpdateUI()

let result = formBuilder.validate()

I check the result from formBuilder.validate(), but I"m not sure what formBuilder.validateAndUpdateUI() does (but saw it in your example code). I don't see those calls documented.

@neoneye
Copy link
Owner

neoneye commented Oct 2, 2021

It seems to end up calling TextFieldCell.reloadPersistentValidationState. This function invalidates a timer and hides an eventual error message shown below the textfield.

Sorrry, I can't remember what I intended with validateAndUpdateUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants