Changing pop-up for form validating

I have simple contact forms that are validated which makes sure the fields in the form are filled out and that it is a proper email address.
I have 2 contact forms on the same page. On the first one the field name's and id's are "name", "email" and "question". If you click the submit button a pop-up come up with:
The following error(s) occurred:
- name is required.
- email is required.
- question is required.
The second form has name's and id's are "name-main", "email-main" and "question-main". The pop-up comes up with:
The following error(s) occurred:
- name-main is required.
- email-main is required.
- question-main is required.
The first one is OK but is their a way to change the second one to something more user friendly?

snarble wrote:
I am just using dreamweaver 5 form validator.
Yeah, I just picked up your other thread so you can't use a 'class' as that's already assigned to the input tag.
You could just forget the protocol about duplicating id's and repeat 'name' as the id for the second form. Only one form will be active at any given time.

Similar Messages

  • What is your strategy for form validation when using MVC pattern?

    This is more of a general discussion topic and will not necessarily have a correct answer. I'm using some of the Flex validator components in order to do form validation, but it seems I'm always coming back to the same issue, which is that in the world of Flex, validation needs to be put in the view components since in order to show error messages you need to set the source property of the validator to an instance of a view component. This again in my case seems to lead to me duplicating the code for setting up my Validators into several views. But, in terms of the MVC pattern, I always thought that data validation should happen in the model, since whether or not a piece of data is valid might be depending on business rules, which again should be stored in the model. Also, this way you'd only need to write the validation rules once for all fields that contain the same type of information in your application.
    So my question is, what strategies do you use when validating data and using an MVC framework? Do you create all the validators in the views and just duplicate the validator if the exact same rules are needed in some other view, or do you store the validators in the model and somehow reference them from the views, changing the source properties as needed? Or do you use some completely different strategy for validating forms and showing error messages to the user?

    Thanks for your answer, JoshBeall. Just to clarify, you would basically create a subclass of e.g. TextInput and add the validation rules to that? Then you'd use your subclass when you need a textinput with validation?
    Anyway, I ended up building sort of my own validation framework. Because the other issue I had with the standard validation was that it relies on inheritance instead of composition. Say I needed a TextInput to both check that it doesn't contain an empty string or just space characters, is between 4 and 100 characters long, and follows a certain pattern (e.g. allows only alphanumerical characters). With the Flex built in validators I would have to create a subclass or my own validator in order to meet all the requirements and if at some point I need another configuration (say just a length and pattern restriction) I would have to create another subclass which duplicates most of the rules, or I would have to build a lot of flags and conditional statements into that one subclass. With the framework I created I can just string together different rules using composition, and the filter classes themselves can be kept very simple since they only need to handle a single condition (check the string length for instance). E.g. below is the rule for my username:
    library["user_name"] = new EmptyStringFilter( new StringLengthFilter(4,255, new RegExpFilter(/^[a-z0-9\-@\._]+$/i) ) );
    <code>library</code> is a Dictionary that contains all my validation rules, and which resides in the model in a ValidationManager class. The framework calls a method <code>validate</code> on the stored filter references which goes through all the filters, the first filter to fail returns an error message and the validation fails:
    (library["user_name"] as IValidationFilter).validate("testuser");
    I only need to setup the rule once for each property I want to validate, regardless where in the app the validation needs to happen. The biggest plus of course that I can be sure the same rules are applied every time I need to validate e.g. a username.
    The second part of the framework basically relies on Chris Callendar's great ErrorTipManager class and a custom subclass of spark.components.Panel (in my case it seemed like the reasonable place to put the code needed, although perhaps extending Form would be even better). ErrorTipManager allows you to force open a error tooltip on a target component easily. The subclass I've created basically allows me to just extend the class whenever I need a form and pass in an array of inputs that I want to validate in the creationComplete handler:
    validatableInputs = [{source:productName, validateAs:"product_name"},
                         {source:unitWeight, validateAs:"unit_weight", dataField:"value"},
                   {source:unitsPerBox, validateAs:"units_per_box", dataField:"value"},
                        {source:producer, validateAs:"producer"}];
    The final step is to add a focusOut handler on the inputs that I want to validate if I want the validation to happen right away. The handler just calls a validateForm method, which in turn iterates through each of the inputs in the validatableInputs array, passing a reference of the input to a suitable validation rule in the model (a reference to the model has been injected into the view for this).
    Having written this down I could probably improve the View side of things a bit, remove the dependency on the Panel component and make the API easier (have the framework wire up more of the boilerplate like adding listeners etc). But for now the code does what it needs to.

  • Script for Form validator in head causes error

    When I use the Window/Behaveiors/ to create a form validator, Dreamweaver CS5 puts script in the Head of page, and seems to work ok. But when I validate page with W3c it says there are errors with code and as Dreamweaver created this I have no idea what to do to put right, so could someone please help. This is code generated by Dreamweaver, all other pages have past with flying colors!
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>

    If the script is working fine in all browsers, you could put it in an external JS file and link to it, then the W3C validator won't find an error.
    If you don't know already, learn about how to do this:
    http://www.hypergurl.com/jsfiles.html

  • Changing POP-server for incoming mail Yosemite

    I just installed Yosemite. Now I got an e-mail from my mail provider that I needed to change the pop server for that account. When I go via mail/perferences/accounts to my settings, I can edit all the fields except the field "incoming mail server"  that is grayed out. How to change that?

    Contact your mail provider to make sure the incoming and outgoing mail server for the account is correct.

  • POLL: PHP or JS for form validation.

    I'm just getting started with my first from the ground up app
    and still not sure which will serve me best. At this stage I'd rate
    my skill level in each language about the same, intermediate. Since
    both handle regex I can't decide if server-side or client-side is
    the way to go. Or is there a place and need for each? I'm
    interested in things like portability, compatibility, security,
    speed and anything else you think is an important factor.
    Would like to hear from people that have made this decision
    and what benifits you feel you get from your choice.
    Thanks in advance,
    Mike D.

    On 19 Jun 2007 in macromedia.dreamweaver.appdev, mdonahue
    wrote:
    > I'm just getting started with my first from the ground
    up app and
    > still not sure which will serve me best. At this stage
    I'd rate my
    > skill level in each language about the same,
    intermediate. Since
    > both handle regex I can't decide if server-side or
    client-side is
    > the way to go. Or is there a place and need for each?
    I'm interested
    > in things like portability, compatibility, security,
    speed and
    > anything else you think is an important factor.
    >
    > Would like to hear from people that have made this
    decision and what
    > benifits you feel you get from your choice.
    Poll?
    You absolutely, positively have to do validation serverside.
    Javascript
    validation can be avoided by the simple expedient of shutting
    off
    javascript. (For example, spambots which abuse forms don't
    run
    javascript.) Your only choice is to use some kind of
    serverside
    validation. If you want to do clientside validation with
    javascript,
    that's an added feature, but it's not necessary.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • Changing Page Upon Successful Form Validation

    I am trying to create a sort-of registration process and am having some difficulty.  I'll try to explain this as clearly as I can (forgive me, I'm a little new to all this):
    I have a form where I am using Spry validation widgets.  I'd like the submit button to validate those entries and keep the user on the page if any field doesn't pass, but take them to another page if the form checks out ok.  I can't figure out how to do this.  I've tried using behaviors to make the submit button also be a link but what ends up happening is that the link works whether the form passes validation or not.
    Is there any simple way to accomplish this with Dreamweaver's tools?  Any help is appreciated.

    That is not entirely true. Using SpryValidation you automatically stop the form from being processes (that is if the browser is JS enabled). If the form validates upon submission, then the action will take place. If the action is to go to another page then it will do so.
    The following is a very simple example
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <form action="action.php" method="post">
    <input name="frmSubmit" type="submit">
    <span id="sprytextfield1">
    <label for="text1"></label>
    <input type="text" name="text1" id="text1">
    <span class="textfieldRequiredMsg">A value is required.</span></span>
    </form>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    </script>
    </body>
    </html>
    Gramps

  • Changing CSS for form field elements?

    Hi,
    Is there a way we can change the CSS for Form text fields in APEX 4.1 so that they look a little better? Or is the .css file located somewhere where we can just go and change?
    Thanks,
    Sun

    Hi,
    If you are referring to changing the CSS properties then you can do that.
    Add /override styles to the page item's HTML Form Element Attributes
    style="<cssproperty1>:<value1>;<cssproperty2>:<value2>;"
    e.g.
    style="background-color:red;color:yellow;"Red/yellow is certainly not "looking better", the idea is to give you the direction.
    If you know the class of the item(s) then you can change the styles by overriding the built-in style of the template by adding the &lt;style&gt; in the Page HTML
    Header as well.
    Or, define your own class, add the class to the HTML Form Element Attributes field and adding the style in the Page HTML Header.
    regards,

  • HT1349 how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    SfromW wrote: ... how can I change an email for authorization, the email address we used years back, is no longer a valid email address
    How to change account here: http://support.apple.com/kb/PH1641
    If you need more help, start here: http://www.apple.com/support/itunes/
    SfromW wrote: ... we can't remember the password from the old email address (for authorization)...
    Help Retrieving and changing passwords here: http://support.apple.com/kb/HT1911
    If you need more help, from iTunes for Windows, click  iTunes > iTunes Store > Support
    SfromW wrote: ... apple should make it easier to transfer authorization authority....I would think anyways.
    You might want to rethink your thoughts about making transferring authority easier.  Making it too easy would certainly degrade your account's security.  If you still believe it should be easier, you can send feedback directly to Apple via http://www.apple.com/feedback/itunesapp.html
    You will not get a response, but you can be certain that the responsible Apple people will see your input for consideration in FaceTime product development.
    As a new user, please understand that you are NOT directly addressing Apple here.  For more info about Apple discussions, start here: http://discussions.apple.com/static/apple/tutorial/etiquette.html 
    Message was edited by: EZ Jim
    Mac OSX 10.7.4

  • Help...ipad2, did ios5 upgrade yesterday which made me change apple id for an email account instead of my usual one word username. Now can't update apps because old apple id still pops up asking for also previous pwd.!!

    Apple ID big mess...one misspelled username, one "old" username that won't accept pwd and new id that will not pop up for use in app udates or itunes!!!!!! HELP!?

    You need to sort out which iTunes account is valid (use iTunes on computer and login with the correct acct/password), as all of your Apps should still be associated with that account.  If you are referring to the iCloud account that you set up at the install of iOS5, you can still have have a separate iTunes account that's different than what you use for iCloud.  However, Apple recommends that you use your iTunes account login for both if you want to later use music streaming/iTunes Match.  If you decide to have different iCloud/iTunes accounts on the same device, go to Setting>Store and then enter your old iTunes account email and password there. If your iCloud username is messed up, you can delete the account from the device under settings>icloud; you can then set up a new one or select that you want to use your iTunes account.

  • When trying to download Itunes this pops up " key not valid for use in specified state" what does this mean and how can I fix it?

    When trying to download Itunes this pops up " key not valid for use in specified state" what does this mean and how can I fix it? I am using a pc laptop if that makes any difference.

    Try reading through this thread: key not valid for use in specified state. Possible solution involves moving the RSA folder. Rather than deleting it as aniwack suggested I'd try this:
    For "Key not valid for use in specified state" errors try moving the folder RSA from C:\Users\<User>\AppData\Roaming\Microsoft\Crypto\RSA to say C:\RSA (just in case there should be a need to restore it) then try installing again. This folder appears to act as a cache and should be rebuilt automatically as required.
    tt2

  • I have recently changed my apple Id email and my old one keeps popping up for no reason

    Why does my old apple id keep popping up for no reason I have recently changed it

    /Could be that you need to update an app.  All apps are tied to the apple id that was used to download apps.

  • On Sales Order form Validation for selection tax category as Form C

    Hi All Experts,
    Please help me out for the Validation on Sales Order Form that if CST (Central Sale Tax) Sales Tax code Selected in the transaction form should not get added (Posted into the system) till the Tax Category in the Tax Tab is not selected with Form C.
    Thanks in advance...
    Arinjay Shah

    hi,
    In sales order,you can manually update transaction category even after adding document,
    Why there is need for validaion,If u requires validation use approval procedure,since it
    can be activated only at header level.
    Use this query to trigger approval procedure
    Select DISTINCT 'True' Where $[RDR12.TransCat] IS NULL OR $[RDR12.TransCat] = ' '
    Jeyakanthan

  • Change template for Form Checkbox Item?

    I would like to remove the <label> tag from the template for Form Checkbox items and replace this in the list with my own label tag
    E.g. something like this
    select '<label onmouseover...>'||reference||'</label>', table_id r
    from tabel
    order by 1
    Is this possible?
    Thanks & regards
    Edited by: rw on May 3, 2012 6:10 AM

    Checkbox is <input> HTML tag with type="checkbox"
    The Label that wraps this Input is generated by Apex while rendering and stores important information.
    It is not advisable to play with that area even if someone gives you a technically feasible solution like "use a jquery selector to change the tags" in onload event,etc.
    Please find a more elegant solution to your problem.
    E.g. look at APEX_ITEM API
    Regards,

  • How do i change my telephone numbers keeps asking for a valid one??

    how do i change my telephone numbers keeps asking for a valid one??

    If you simply chose the wrong phone number setting Messages up on the iMac you just go back into it's settings and choose the right number.
    If your iPhone number is not showing up under the preferences for Messages and FaceTime on your iMac you are logged into the wrong Apple ID on the iMac or your iPhone is not registered to that ID. With the info you give it sounds like you have multiple users using the same Apple ID in which you would have multiple phone numbers listed under the preferences on the iMac and iPhone.
    I have found iCloud, Messages and Factime are easiest setup as each user having their own Apple ID. That's not to say it is impossible for multiple users to use one Apple ID. First you have to sign into the Apple ID on your iPhone which will register the number to that account. Set your iPhone's Messages and Facetime Settings to use it's phone number for send and receive. Then it should appear when you are trying to setup Messages on the iMac. Each user using the same Apple ID will have to be using their own numbers or email address so you may have to have other users uncheck your number. The problem with this setup is it is easy for others to start receiving your messages.

  • Change company address for report: PC00_M40_PTX - Form 5

    Dear Experts,
    I want to change company address for report PC00_M40_PTX - Form 5. Can you please help me?
    Note: Personnel area address already maintain
    Thanks and regards,
    Mayur
    Edited by: Mayur114 on Jul 20, 2011 3:04 PM

    Hi,
    I checked the program, in which Include - PCPTXIN6_PDF line no 57 is used for checking the address & displaying in the output.
    In that CONCATENATE sadr-name1 sadr-name2 is used for the Empr address part. Check in ur case Name2 is having any entry or not.
    The name1 & name2 is 35 character length and it can be maintained in V_T001. Select the Company code & SHIFT+F5, both the fields are on top of the Name header. You can mention the details there & do a test run to check by using both the Function modules.
    Regards,
    Prasad lad

Maybe you are looking for

  • SRM Performance is very slow

    Hi Experts, Users' are having performance issues when SRM Portal is being opened to approve a SC. Our BASIS team have analyzed execution times in the transaction STAD and have identified that HTTP remote execution time is high (53 seconds). Please re

  • Parameters issue in discoverer while writing a view...its urgent please

    Hi Everybody, I have written a view in which i have a where condition which says something like where abc IN ( Select xyz from table2). Now in my desktop, i want a parameter to pass for the subquery as select xyz from table2 where column1='bla bla bl

  • Help! need to re-do word files back to pdf

    I need to re-convert my word doc's BACK to PDF's.....HELP!

  • Automating partition exchange

    I am looking to automate a partition exchange process because I am changing a column from a date to a timestamp. For each parition in a table I want to do the following steps: 1. PEX: SRC_TBL to TEMP_TBL 2. Make the date to timestamp change on the TE

  • I have iMac with outlook for mac 2011

    i have synced my iphone5 with outlook contacts however some contacts appear blank in the column view but there is information on the contact card also any contacts with iphone numbers do not show the number any ideas anyone thanks