Disable instant validation in orbeon form - orbeon

Is it possible to disable instant validation in orbeon form? I want to validate all inputs only when the user submit the form. But in my current orbeon form, the fields always validate their inputs on focus out.

Simple answer: yes, see Validation mode.

Related

Form submit with the form context in HTMLUnit

I have a project where I am converting some old HTTPUnit code to HTMLUnit. Among one of the issues I have ran into is the form.submit() option of HTTPUnit.The form.submit works without having to specifically finding the submit button for that particular form provided I have selected the correct form while initializing the form variable earlier.
Is there something similar in HTMLUnit that I could use?
Just to explain the significance of what I am asking, I am testing a shopping site with several forms (for different product) and each form has it own form button with no specific attribute to separate them. Every form has its own different structure and hence finding the submit button using xpath is a bit difficult.
Specifically what I am asking is there a way in HTMLUnit where I could submit a form on basis of the form itself and not the specific submit button? And if not given the above circumstances could anybody please suggest a workaround?
Thanks in advance.

Validation error messages disappear when Trinidad component panelAccordion is minimized or maximized

I have a form that is very long but is submitted and validated all together. I need to break it up into sections.
I have tried using the Trinidad component panelAccordion to break the form into sections.
However if I then submit and validate the form, clicking one of the panels open or closed causes the validation messages to disappear.
Is there any way to avoid this?
Or is there a better way to achieve the same result of breaking up the form?
I am using Trinidad 1.2.6 and MyFaces 2.0.
Due to corporate standards I cannot use anything else.
One way you can achieve the desired effect is by submitting the form when a user clicks on each <tr:accordionPanel>. It supports many other client side events so pick one that best suits your needs.If you submit the entire form, this will force validation to kick in for all components however, whether the user entered a value or not. This might be the quickest and simplest way but some people might be picky and not like this solution.
You can also make use of partial updates and partial triggers and submit only the components that are part of the current accordion panel based on the event you choose.

User login/registration after filling out form

I want to have visiting users interact with an input form that ultimately requires a user_id. When a visiting user submits the form, it brings them to a confirmation page. At this point, the user should be able to login or register without losing all the information they entered already. What's the best approach for this?
I'm assuming you will have two form submit buttons on the page. A "register" and "login" button. Each of these buttons will be in their own form. I would make hidden fields in each form with the values being the params[:your_variable]from the previous page that you want submitted.
If you want forms for them to edit just set the default value to those params as well.

fluentvalidation multiple submit buttons, different validation scenarios

I have an address search area on my form in my asp.net mvc3 application. the whole form is submitted using the main submit button and the address search is initiated using the search button.
When the user submits the form using the search button only the house number and postcode fields need to be validated. When the user submits the whole form the whole form needs to be validated.
How is this achieved using fluentvalidation?
This is not an ideal situation in MVC design but still you can achieve this buy submitting form on search button click by jQuery. Use separate identifier to specify whether it was submitted by search button or main button by passing additional parameter through jQuery either in model itself or querystring. Once you have that identifier on serverside, you can use custom fluentValidation to validate model with that if..else condition. You can use .ajax as well if that fits in your design.
Hope this helps.

data submission during form submission

i have a form which has two textboxes and a submit button.
on entering data and submitting data gets stored in the database.but if i again refresh the page the same data again gets stored.
How should this be prevented?
One way to solve this common problem is to redirect to another ActionResult, where you inform of the success/failure of the form submission.
Also, try to submit a ViewModel instance (see strongly typed views), not form values. That simplifies data validation.
You should implement a PRG redirect to a confirmation / thank you page.

Resources