Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
HI.
I create <xf:submission action="http://10.10.101.58/saveForm.html" validate="true" relevant="true" id="submitId" method="post"/> and in body element <xf:submit submission="submitId"><xf:label>Przejdź dalej</xf:label><xf:revalidate/></xf:submit> How to do revalidate action who marks invalid fields as do submit button (oxf.fr.detail.buttons.*.*). Thank you |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi,
Are you adding this to a form running inside Form Runner, that you created with Form Builder? You shouldn't need to have that <xf:revalidate/> (also, the way it is there, it won't have any effect.) Are you saying that you'd like the button, when clicked, to show the error for the non-visited but invalid fields, as the default Save and Submit buttons do? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi.
Where i should insert <xf:revalidate/>? " Are you saying that you'd like the button, when clicked, to show the error for the non-visited but invalid fields, as the default Save and Submit buttons do?" Yes, i want to have submit button, witch before submission do revalidate, how to do this? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi,
As mentioned in my previous comment, you shouldn't need the <xf:revalidate/>. The default "Submit" button does all this automatically for you: make sure that the validation is done, show all the errors for the fields that haven't been visited yet, and prevent the submission if anything isn't valid. Am I missing something? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi
I didn't understend, sorry. I changed to <xf:submit submission="submitId"><xf:label>Przejdź dalej</xf:label></xf:submit> And when i cliked on button "Przejdź dalej" and i didn't filed out required fileds, the fields weren't marked as invalid why? I missed something? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi,
I didn't realize (or forgot!) you were creating your own button. If you have your own button, and on click would like to mark all the controls "visited", so their error shows both under the control and in the error summary, you need to do something similar to what is done here, i.e. dispatching fr-visit-all to the error summary: https://github.com/orbeon/orbeon-forms/blob/5c2654d30d1bc38ee4546be710aa3eb1d0fb5ac2/src/resources/apps/fr/components/components.xsl#L293 Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi.
I changed xf:submission to: <xf:submission action="http://10.10.101.58/saveForm.html" validate="true" relevant="true" id="submitId" method="post"> <xf:action ev:event="xforms-submit-error"> <xf:dispatch name="fr-visit-all" targetid="error-summary-control-top"/> </xf:action> </xf:submission> i changed error-summary-control-top to error-summary-control-bottom and it didn't work, why? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi,
Would you be able to attach a sample (minimal) form in which you place that button, and that I can run here to reproduce what you are seeing? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
You were saying:
But I don't see any field marked as required in the form (I'm finding no occurrence of "required" in the source). Am I missing something? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
And attribute constraint in "<xf:bind id="ID24" nodeset="wnio:TrescDokumentu/wnio:Tytul" relevant="true()" constraint="(.!='') and (string-length()<31)"/>" ?
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
I see! But I wasn't able to reproduce this. When the field is empty, it is properly marked as invalid:
![]() And when you enter a value, the alert indicator goes away, as expected: ![]() Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |