I am using "jQuery validation plug-in 1.7" for a page with form fields. The trouble is that the entire from is inside a rounded box created by using "CurvyCorners" plug-in. Since the error messages in my case appear below the form fields, the page size increases on appearance of each error message.
I am using 'curvyCorners.redraw();' on blur of each form element to achieve the page re-size. but every time it resizes the form fields loose focus and I am unable to tab properly in IE7 and below.
Any help would be highly appreciated
Can you please be specific about your error ?
And Try DD Roundies instead of curvy corners.
Related
I have used webshims for html5 form validation in a single page app with multiple pagelets(divs). The forms are not submitted but local javascript is invoked after each conversation and collected data is posted .
Next I iterate over all the fields and reset the values.
Then I take the new user back to the first pagelet having first form for the new conversation. This time even after filling the correct values the border does not turn green.
Note:
However when we select the field and click outside the field without filling it. and then after filling the correct data border turns green.
However when we tried to achieve it programmatically iterating over each field resetting it and using javascript focus method, that did not do the trick.
I am sure I must be missing some thing. would be able to point out what.
Regards
Barman
I'm not sure, what you want to achieve. I would need to see some code. If you change the value programmatically you can update the validation ui with the event refreshvalidityui on the form field. If you want to reset the ui, you can either trigger a reset event on the form or resetvalidityui on the form field
$('input').val('foo').trigger('refreshvalidityui');
or
$('input').val('foo').trigger('resetvalidityui');
or
$('form').trigger('reset');
Please let me know, if this helps.
I am facing problem with showing validation message in a proper position when change the size of the window, am using jquery validation engine along jquery mobile.
When I submit the form the validation message will appear at correct
position when rotate the screen or resize it the message will not move
to its proper field it will remain in the 1st position itself.
Please guide regarding this.
Thanks
passing the parameter autoPositionUpdate: true in validationEngine() will fix this issue but this works in 2.6 version not in 2.2 version of jquery validation engine
I'm trying to make something like this:
an html form with 5 button (each one with a differn value). if you click one of this button will be dispayed an text input (with a default value depending to the clicked button value, so the buttons call an ajax/javscript function to generate the default value) and a submit button.
I'm unable to create this type of form. have any suggestion for me ? Thx in advance.
I wouldn't use CakePHP's AJAX features, just write it yourself. Cake's features are useful in limited situations (e.g. pagination) but as soon as you need flexibility, it becomes a limiting factor. I believe the JsHelper is actually being removed in future versions.
To get this done without Cake, take a look at http://jsfiddle.net/mjxWg/8/. It's not a complete working example (e.g. there is no <form> tag), but it should show you enough to get started on your own.
i'm trying to implement an edit/add profile page which looks the following:
image upload component (Tomahawk t:inputFileUpload) with upload button
several input text fields
cancel and save button
As said, this form is used for adding a new profile as well as editing existing ones. At first, i used two elements, one for the text input, one for the upload component. The problem with this is, since the upload componenet does not support ajax/ partial rendering, the whole page is reloaded and any changes on the text inputs is lost. When i use one unified , the validation is triggered on the textfields when the upload button is pressed and the user is forced to fill out all the inputs first, before it is possible to upload an image.
My desired behaviour would be, that if the textinputs are unchanged, i can still upload the picture while changes are being applied to the backing bean and validated. Validation on unchanged/empty fields should only be triggered, when the final submit button is pressed. How can this be done? Any standard scenario/best practice methods for this or do i have to implement a valueChange Listener? Thank you guys in advance and kind regards!
Solved the problem, i wrote a custom validator and checked for the action that triggered the submission of the form using this:
ctx.getExternalContext().getRequestParameterValuesMap().containsKey("form:uploadButton");
Where ctx is the current instance of FacesContext. Maybe this helps someone, it is a workaround however it does the job.
I have an app that is using standard out of the box form validation so when a user clicks the submit buttons and there are required fields not filled in, the validation message pops up next to the empty field. This is great, however, because our form is quite long we also like to display the same error messages at the top of the page in a bulleted list or something. Is there a quick way to do that? I can't seem to find where the validation is getting triggered in the jquery code to add new code to it. Anyone have any suggestions?
Thanks,
Rhonda
I figured out a way to do this that was quite simple. I just put a div at the top of the page and put all the #Html.ValidationMessageFor(m => m.Email) for every field in that div. This way they show up in both places.
Rhonda