Form Validation - Can this be done?

I have a form with several dropdown menus.
One dropdown menu has two options yes - no
Depending on which option is selected, i want the following
'text' field to
either be greyed out (if 'no' is selected) or editable (if
'yes' is
selected).
Can this be done and if so, how?
Thanks
Andy

Hi Paul
Just tried your code and it does disable the text box no
matter what was
selected from the previous dropdown.
How do i get the code to only disable the text box if the
dropdown has a
particular vaue? i.e. "no"
it would also be great if you could point me in the right
direction
regarding the use of css to grey the text box out.
Much Appreciated.
Andy
"Paul Davis" <[email protected]> wrote in
message
news:ftijsu$qq$[email protected]..
> Yes it can, on the select form field, add:
>
>
onChange="document.getElementById('field1').disabled=(this.selectedIndex==0)?'':'disabled '"
>
> Now, this will disable the field and any text in it
becomes gray, and,
> depending on the browser, some borders become gray - to
take it further
> you would need to assign some CSS changes as well (which
is a little more
> complex)
>
> Paul Davis
>
http://www.kaosweaver.com/
> Visit us for dozens of useful Dreamweaver Extensions.
>
>
http://www.communitymx.com/
> Partner at Community MX - Extend your knowledge
>
> Andy wrote:
>> I have a form with several dropdown menus.
>> One dropdown menu has two options yes - no
>> Depending on which option is selected, i want the
following 'text' field
>> to either be greyed out (if 'no' is selected) or
editable (if 'yes' is
>> selected).
>> Can this be done and if so, how?
>>
>> Thanks
>> Andy
>>

Similar Messages

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • Can this be done? Emailing a completed form without emailing.

    When using a standard html form, a user can fill in the required fields, press post, and abracadabra, the results of the form are emailed to the specified account and the user is redirected to a page that says your form has been submitted.
    Can this be done using a .pdf? The email button is simply retarded. Why do users have to go through the hassle of having their email client opened just to submit the form they just completed? There probably isn't any other way, but would be nice if there was.
    Is it possible to create a submit button that will automatically email the completed .pdf form to a pre-specified email address and then redirect the user to a "thank you" page? I don't want to annoy my customers by forcing them to email me the form. I just want it sent when they click "submit."
    Is this even possible? If so, is it relatively easy?
    Any help is greatly appreciated!

    >Can this be done using a .pdf?
    Sure. The principle is exactly the same: you submit data to a script
    which runs on a web server. You are limited only by what the
    programmer has made the script do. Don't be under any impression that
    it is "magic": if you have a web form which submits and then you get
    an e-mail it's because there is a script on a web server that a web
    programmer wrote to make it happen.
    > The email button is simply retarded.
    I prefer to think of it as a handy tool for testing, but nothing
    anyone would use for the real solution.
    >Why do users have to go through the hassle of having their email client ...
    They don't. Did you know that you can "submit" an HTML form to e-mail?
    But nobody does, because it just isn't a good way of working. Everyone
    expects an HTML form to submit to a web script, but for some reason
    hopes they can use direct e-mail of PDF forms.
    Aandi Inston

  • I need to read data from a text file and display it in a datagrid.how can this be done..please help

    hey ppl
    i have a datagrid in my form.i need to read input(fields..sort of a database) from a text file and display its contents in the datagrid.
    how can this  be done.. and also after every few seconds reading event should be re executed.. and that the contents of the datagrid will keep changing as per the changes in the file...
    please help as this is urgent and important.. if possible please provide me with an example code as i am completely new to flex... 
    thanks.....  

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can this be done?

    I am formatting a form in Adobe Acrobat Pro 9. One of my fields is for a credit card number. I have set up a "Special" Arbitrary Mask to the format and limit of numbers that can be entered.
    What I would like to do it Mask some of the numbers as they are entered. I entered the Arbitrary Mask as 9999-****-**99-9999. The problem is that this set up is causing the entry to skip the ***. My concern then is that the person entering the data will not realize this skip and not provide the correct ending numbers.
    What I would like to happen is that the person entering the data will type the complete 16 digit number and the system will MASK the numbers I designate with an **.
    Can this be done?
    Thanks in advance for any assistance.
    Kathy

    Hopefully I'm not breaking any posting rules by saying "I think I love you!"
    My functional desires always exceed my knowledge level so I want what I don't know how to create. Your script totally worked and I would never have figured that out on my own. I want to learn what you do very badly.
    We are masking the numbers for security reasons. We know the numbers being masked but we don't want to store the full number in our records. 
    Thank you so much for your help, What kind of experience do you have with Access 2007 or 2010?
    Kathy

  • I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    Well, I really would love the new unreleased mac pro however , I'm not sure of the expected cost , Everyone speculates from $3,000 to $8,000, in which I may have to wait a while to purchase.
    To the point .... I want fully functional thunderbolt ports to be on the current mac pro's .... wonder if anyone had workarounds yet?...  or could I chain the the current mac pro to a mac mini to make that happen?

  • I AM TRYING TO FORWARD TX MESSAGES TO MY COMPUTER, CAN THIS BE DONE?

    I AM TRYING TO FORWARD TX MESSAGES TO MY COMPUTER, CAN THIS BE DONE?

    You should be able to forward them to your e-mail, or you could use a text backup app from Google Play that will backup your texts and e-mail them to you (SMS Backup and Restore is an example).

  • In Mail with Snow Leopard you could number your e-mails. Can this be done with Lion?

    In Mail with Snow Leopard you could number your e-mails. Can this be done with Lion?

    If you're referring to desktop icons, right click on the desktop > Show view options > check "show item information".

  • How do I set up two separate iTunes accounts on one MacBook Pro in order to manage the wife's iPhone and my iPhone? Can this be done?

    How do I set up two separate iTunes accounts on one MacBook Pro in order to manage the wife's iPhone and my iPhone (with separate info on each of course) ? Can this be done? A little step by step would be greatly appreciated; just short step by step though, I can follow fairly well.
    Kindest Regards,
    Phil T.

    You would each need to use your own user account on the Mac, you can do this at system preferences > users & groups.

  • I would like to transfer the balance from one Apple ID to another how can this be done??

    I want to transfer the account ballance from my account to my son's. I unintentionally redeemed one of his gift cards to my account. how can this be done?

    Sorry, but balances can't be transferred from one iTunes Store account to another. You'll either have to make his purchases through your account, or buy another prepaid card and redeem that in his account.
    BTW, for future questions, this forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help if you ask in the general iTunes forums.
    Regards.

  • I want to shoot a movie on my iPhone and edit it on my iPad using the iMovie app. How can this be done via iTunes on my computer?

    I want to shoot a movie on my iPhone and edit it on my iPad using the iMovie app. How can this be done via iTunes on my computer?

    You can't drag video into the filesharing pane of iTunes, you can only transfer projects.
    Videos need to come in via the photos tab of iTunes.
    The easiest way to get videos from the iPhone to the iPad is via the project export import.
    Projects can be exported from the iPhone, then imported to the iPad like this:
    iPhone Send a project or trailer to iTunes
    If the marquee screen isn’t showing, tap the My Projects button .
    Scroll to center the project or trailer you want to share.
    Tap the Share button at the bottom of the screen, and then tap iTunes; tap OK when iMovie indicates that export is complete.
    Connect your device to your computer, and then open iTunes on your computer.After a moment, your device appears in iTunes, below Devices on the left.
    Select the device, and then click Apps at the top of the iTunes window.
    Select iMovie in the Apps list below File Sharing. (You may need to scroll to see it.)
    In the iMovie Documents pane, select the file you just shared, and then click the “Save to” button; save the file to your computer in a place where you can find it easily.You can also save the file by dragging it to the desired location on your computer.
    Disconnect the device from your computer.
    iPad Import a project or trailer from iTunes
    Connect your device to your computer, and open iTunes on your computer.After a moment, your device appears in iTunes, below Devices on the left.
    Select the device, and click Apps at the top of the iTunes window.
    Select iMovie in the Apps list below File Sharing. (You may need to scroll to see it.)
    Click Add below the iMovie Documents pane; in the window that appears, navigate to the file you want to add.
    Select the file, and then click Open to copy the file to your device.The file appears in the iMovie Documents pane when copying is complete.
    Open iMovie on your device; if the marquee screen isn’t showing, tap the My Projects button in the upper-left corner above the viewer.
    Tap the Import button at the bottom of the screen, and then tap the name of the project you want to import.When the import is complete, the project opens and can be edited like any other project.

  • I want to have 2 seperate libraries with content in different locations, can this be done?

    Hi there, I have 2 uses for itunes, one is for my mobile DJ business and for this I store all of my music on a 2TB external firewire 800 HDD I use Traktor Pro to mix, but find itunes very good for creating playlists.  I would however like to be able to store seperate content on my internal drive in a different library for personal use as a great deal of the stuff in my DJ collection I personally have no time for, and do not want the inconvenience of needing to connect my external HDD to be able to listen to my own collection.  I have a SSD installed and have tried depressing the CMD button during startup of the application although no option for creating a new library presents its self, it may be that the start up is too quick for me to be able out this.  Any ideas guys? Many thanks.

    Trying2loveMac wrote:
    Can this be done? If so, how?
    there may be other (better) ways out there but all i can think of is this:
    1) make one iTunes library the main one and "consolidate" files that aren't in it, but in the other computer's libraries, to it.
    you can use home sharing for this but home sharing won't copy ratings, playcounts, and original "date added". a 3rd party tool such as PowerTunes would be very useful if those details are important to you.
    2) once the "main" library is created, copy the entire iTunes folder (not just the iTunes music or media folder) to the media server, launch iTunes while holding the option(⌥) key, click on choose library when prompted, and select the iTunes folder you copied to the new location.
    3) repeat with the other Macs.
    with a setup such as this, be aware that only one iTunes at a time can access the library. if your intention is to enable multiple machines to access the library simultaneously, you will probably have look into a NAS with a built-in iTunes server.

  • I have just got a new computer and I want to transfer Adobe Acrobat to my new one can this be done ?

    I have just got a new computer and I want to transfer Adobe Acrobat to my new one can this be done ?

    Hi Ianpce,
    You need to download and install Adobe Acrobat on the new machine to use it.
    You can use the same subscription or the serial number to activate the product.
    Thanks

  • Have just migrated from the world of PC's. and I had my set up so that when I typed a new sentence it started with a capital with out me pressing shift. also, i could set up words to self fill like ur would auto correct to your. can this be done with mac

    Have just migrated from the world of PC's. and I had my mail text typing set up so that when I started  a new sentence after a full stop  it started with a capital with out me pressing shift. also, i could set up words to self fill like ur would auto correct to your. can this be done with mac

    I don't know about the first letter cap but the spelling is simple. Edit - Spelling and Grammar - Select While Typing and Correct Spelling Automatically.
    I'd also STRONGLY recommend that you bookmark and use:
    Mac 101
    Switch 101
    Find Out How Video tutorials
    List of Useful URLs for switchers
    Welcome to the Light side.

  • I have a Power Mac G4 (2004) and want to transfer all my files to a new MacBook Pro 15.4". Can this be done thru firewire cable or do I have to transfer to an external Firewire 800 hard drive first?

    I have a Power Mac G4 (2004) and want to transfer all my files to a new MacBook Pro 15.4". Can this be done thru firewire cable or do I have to transfer to an external Firewire 800 hard drive first?

    Do it with a Firewire cable (buy a 800/400 adapter if you need it) - the USB transfer takes a much longer time.
    Start up your old PowerMac G4 holding down the "T" key, for target disk mode.
    On your new MacBook Pro open "Migration Assistant" in your utilities folder.
    Connect the 2 computers by firewire cable and follow the prompts in Migration Assistant.

Maybe you are looking for