There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
I am trying to use jquery: validation plugin by Jörn Zaefferer. Which works really well I have to say. The one limitation I am trying to work around is how I can run validation for required fields before I submit a form. At the moment I have to submit the form before I see the error messages for required fields I would like to see them prior as the user tabs through the form.
How do I disable the submit button if all required fields in a form are not filled in? Say I have a form with Name, Age,message, and email. Name, message and email must be filled in or else the submit button will not show or will be disabled and then enabled once filled. If the fields are filled in then the submit button will show. If the fields are filled in but then one is deleted then the submit button will hide. Ideally if I can have it disabled that will work, if not I will settle on hide at this point.
You can see that when selecting 'Contact' from the top navigation a light-box (fancybox) with a contact form opens, this form can be filled and when the submit button is pressed the content of the form is emailed to myself. However.... The 'Thank you message' is not appearing in the light-box as I would like it to and I cannot work out how to do this.
I'm creating a form that has 30 odd fields, and I want to display certain fields based on the value of a select box. So say I have the following groups:
Group A: field 1 field 2 field 3 field 4
Group B: field 2 field 3 field 6 field 7 field 8
Group C: field 2 field 7 field 8 field 9 field 10
What would the best (i.e fastest and easiest) way to show/hide the various fields? I was thinking about two different ways to approach this. One, having a multidimensional array with the allowed fields for each group. Two, having a custom attribute that defines which group(s) the corresponding form field belongs too. What do you think?
I have a form that has 4 "required fields" that validate using JS. I am now trying to add a 5th "required field" (the difference is that this field is a "radio button input as opposed to a text input).
I have it working so that when the 1st radio button is selected, the form will go through. However, when the 2nd radio button is selected, it comes up with the "please fill in all required fields" error.
Here is the JS I have so far:
I tried adding the 2nd radio button value like this:
(document.indiv_reg.skill.checked =="") || (document.indiv_reg.skill.checked =="") But when I do that, then even when the 1st radio button is selected it comes up with the "please fill out all required fields error".
I need to create a form that has three questions, but the answers have to match my answers...what is the best way to do this (without DB). I was thinking create an array with the 3 answers then match the fields with the answers in my array.
I have a form that collects information about up to 5 items. I would like the user to be able to select from a drop down menu how many items for which they want to compare information, and then have the form change the number of input fields accordingly.
In other words, if the user selects enter info for 3 items, then input fields for only 3 items are shown, if they change it to 4 items, then a fourth column shows up in the table with the appropriate input fields.
I have the following cookie pre-set (this is part of an exercise in reading cookies and displaying the information "dynamically"):
var cookieString = 'copperfry:20 inch copper pan=prodblank&' + 'greenfry:20 inch green pan=prodblank&' + 'silverfry:20 inch silver pan with cover=product1&' + 'redfry:20 inch red pan=prodblank'
I have lots of ideas floating around in my mind as to how this SHOULD work and what I SHOULD include, but don't seem to be able to grasp them and put them down in a logical order which actually works....
Can anyone give me some pointers as to how I can read my cookie to display the wishlist, or does anyone know of a website which uses this kind of function that I could work from?
1)i need to create a form with few fields like phoneno,website,address etc and one text area. 2) i copy n paste the details in the textarea n when i click d button. it should automatically populate things into the respective fields.
here s my logic wt i taught of:
1)read the first line in the textbox and load it into contact person field. 2)find the @ symbol and put it into the respective field and if there are more than 1 mail id load it into the same feild using commas. 3)if the phone no is 10 digits then load it into the mobile field else load the rest it into phone field. 4)find for words like road,street,block,stage,floor etc,if present then load it into the address field till the last comma is encountered. 5)the last digits in the address should be loaded into the pincode field. 6)the last word present in the address after the last comma and before the hyphen should be loaded into the city field. 7)find for www or http and load it into the website field,if not found leave it blank.
My CMS generates forms in a specific way, and I need to change the way validated fields are selected. I'm using the validation plugin: It identifies form fields that have the "required" class. My CMS generates required elements like this:
<div class="required"><input /></div>
I was hoping this can be easily changed in the plugin syntax, but I can't find any reference to such a change (to select the required fields using this selector: ".required input"[where input is any form element])
I have a basic html form with some text input fields and a couple drop down selection lists. Our employees print the form and include it with items they need our shipping department to ship for them. The form uses the following verification script to ensure the required fields have been populated before the screen prints. It works exactly as desired in Safari and Firefox. In Internet Explorer, however, the selections made in the drop down lists are reset to the default values on the printed form.
Before you respond with, "don't use Internet Explorer," you have to understand that Internet Explorer is our only corporate approved web browser because it is the only browser supported by some of our other "mission critical" third party web apps and because it can be more rigorously controlled using Group Policies than Safari, Firefox, Chrome, Opera, et al, can. How to make the form print without resetting the drop down list selections? :confused:
I downloaded a contact box from GreyBox to incorporate into my website (I like how they pop out on the same page instead of directing you to another page). From their example, I isolated the part of the code that I wanted to use and pasted it into my code, but it didn't come out the way I wanted it to.On my site, I have a GMAIL logo and when it is clicked, I want it to take the user to a pop out window. I am able to do this when the code is isolated in its own project, but when I incorporate it into my project, and view it in a broswer, it becomes a link and when you click the link, it redirects you to another page(instead of staying on the same page with a pop out box).Here is the code for the isolated project:
HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "(URL address blocked: See forum rules)"> <html xmlns="(URL address blocked: See forum rules)" xml:lang="en"> <head>
though I am quite an advanced and experienced VB& .NET programmer, I am totally new to Jscript coding, (I don't actually code Jscript) but I build websites all the same too. I am also new here.I am working on a website and I really wish to incorporate a contact or an order form to it so that when the user fills in the fields and clicks send, I receive the data in my email.