I'am using Orbeon Forms CE edition. Is there any option to select pre-set formulas for input fields in form builder? In email field, when I select formula in validation I am writing my condition or regex to validate the form data, is there any option to add validation conditions and regex in Dropdown data rather than writing...
You can define those validations as simple types in an XML schema, for instance using regular expressions. Then you can attach your schema to the form in Form Builder, and those simple types will show up in a dropdown in the Control Settings dialog, in the Validations and Alerts tab. However, this feature is only available in Orbeon Forms PE. For more on this, see schema support.
Related
I am using an remote auto-complete field from jquery mobile like explained here:
http://demos.jquerymobile.com/1.4.0/listview-autocomplete-remote/#&ui-state=dialog
2 such autocomplete fields are to be added in a form.
Please suggest how will I make auto-complete fields required.Basically how do I apply client side validation on this field.I am having problem in retrieving the values of these fields.
Also, how will I get the value of this field from request at server side when the form will be submitted(using something like request.getParameter("nameOfField") ).
I have setup a page on my website where admin staff can create a competition and add any number of fields for certains types and they can be set to required or not to this competition.
When the competition page itself is loaded the questions load dynamically from the database using editor templates for each question type ie Text, Multi Select, Multi Line Text, Email
There are a few tables but the main ones are competition, CompetitionQuestions and QuestionTypes
Each competition can have multiple questions of different types.
The settings on the Question types have the validation type ie Email, RegularExpression, Length etc
and the Questions when added for each competition can be set as required or not
Now I can get my competition page to lead fine dynamically adding the questions for the page with an EditorFor and an Editor Template for each type.
My problem is I don't know how to manually apply validation for the required questions and the validation based on the question type validation settings?
Need to select and submit a form on a page containing many different forms, which has a hidden field with a particular value.
I know there's form.fields_with() to select form fields, and page.form_with(), to select forms with particular attributes, but I want to select a form which has a hidden field with the value attribute 'xxxxx', for example.
Is there a way of doing this in Mechanize? Or am I stuck using xpath or a hack solution? The XPath for what I want is
xpath("//form[div/input/#value='xxx']").click_button
Of course I cannot click_button on an xpath, though.
You could do:
page.form_with :form_node => page.at(xpath)
I'm using the validate() - method of struts2 to validate the form input. In my struts.xml I can define a result with name "input" which is displayed if the validation fails. This for the context :-)
Now my question: the form I want to validate contains a selectbox which is filled out of a database. The first time the form is displayed everything works fine. But if I validate the form and the "input" - result is displayed, I get an IOException because of the iterator which outputs the db-result into my selectbox. Is there a solution from struts2 or do I have to use a plugin or something like that? Thank you!
When validation fails, it's often necessary to "reload" data for the form page. There's a FAQ entry that covers repopulating controls after validation, mainly detailing the Preparable interface (preferred) and the use of the <s:action> tag (there are some subtle gotchas that can pop up with this, but in general, it's also okay).
There is a study here my co-worker took to my notice. Basically, that in-line form validation is a good thing.
But how would you do in-line multi-field form validation in MVC assuming you already have a "yield return" setup to return a list of form violations? Is the in-line validation only for primitive values like "a zip code should not include alpha characters?"
Would you submit some Javascript code to the client that checks that "this field and this field should be evaluated together firing this validation, and oh by the way, we are going to validate all fields again on a final submit?
Anyone have code example (C# and MVC) to illustrate handling in-line multi-field form validation using a remote repository (but not all fields at one time)?
I don't have any code but if I was going to do inline validation I would implement the validation sample in Nerd Dinner.
Clearly this would validate on a submit so not really useful to your question. However, if you couple it with jQuery then it does become useful.
Essentially I'd be doing a jQuery postback at key points, checking for validation errors, and then highlighting the errors to the user in the callback.
You can attach events to say the lost focus events of fields that have a certains style class or to all fields etc. Really quite extensible in that regard.
There are tons or samples on jQuery and how to post back etc.
I'd also still be doing the full validation check on postback as well just to catch anything that may have been missed.
Does this help?