Hi all,
I have a form with a submit button the sends the entires to a Sharepoint list. I added a second function to the button to navigate to a second screen that thanks them for their submission and outlines what they should expect.
The problem is it navigates to the page whenthe submission fails (eg due to incomplete fields).The error message still pops up but I know people will miss it and assume the form submitted correctly.
Is there arnything I can add to prevent navigation when the submission fails?
This is what I have now:
SubmitForm(Form1); Navigate(Screen1, Fade)
Solved! Go to Solution.
There's a few methods I'd recommend to solve this:
It's a lot to describe, but I think you can search the forum for ways to do those things.
Hi,
Each form has OnSuccess and OnFailure properties. Instead of making your button Submit the Form and then Navigate, you can make the form Navigate upon being succesful in submitting the form.
So you can set Form.OnSuccess to:
Navigate(Screen1, Fade)
And keep the button only:
SubmitForm(Form1)
That solved my problem but created a new one unfortunately. When I do the above the form will always submit even when required fields have not been completed.
I also tried making the form onsuccess
SubmitForm(Form1); Navigate(Screen1, Fade)
There's a few methods I'd recommend to solve this:
It's a lot to describe, but I think you can search the forum for ways to do those things.
I was going to come back to this and fix the issue but when I put the previous solution in place it worked perfecty.
Why it stopped submitting incorrectly now I'm not sure but if it's working that's good enough for me.
Great solution. I spent 2 hrs figuring out various other solutions.
Hi @Anonymous
You can also use the Valid card and form properties to do validation before trying to execute the submitform which then triggers the infamous "An entry is required or has an invalid value. Please correct and try again." error.
Please see below video that shows how you can use this.
Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉
Use expression like this for submit button. If the datacard value is blank then submit button onselect will not work
If(
!IsBlank(DataCardBusiness.Text)
And !IsBlank(DataCardValueConLEI.Text)
And !IsBlank(DataCardValueReqDoc.Text),
DisplayMode.Edit,
DisplayMode.View
)
The form comes with validation of the fields required. You can put Submit(form) on the button and go and click on a form and go to OnSucess option to put to Navigate to another page. In this way you will be redirected only if the form was filled correctly.
User | Count |
---|---|
252 | |
101 | |
94 | |
47 | |
38 |