flash form validation functions

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Re: flash form validation functions

    had to play around with it, turns out you can't put that complex of
    actionscript in the bind attribute. But if you use a button, or anything
    with a onClick or onChange event you can do it.

    try this
    --------------
    <cfform format='flash' width='250'>
    <cfinput type='text' name='prefix' label='Prefix'>
    <cfinput type='text' name='firstname' label='First Name'>
    <cfinput type='text' name='lastname' label='Last Name'>

    <cfinput type="Button" name="checkname" value="check name" onClick="if(
    prefix.text.length != 0 && firstname.text.length != 0 &&
    lastname.text.length != 0 ){ completename.text = prefix.text +' '
    +lastname.text +',' +firstname.text; } else { completename.text = 'Name Not
    Complete';}">
    <cfformitem type='hrule'></cfformitem>

    <cfinput type='text' name='completename' label='Full Name'>


    </cfform>
    ----------------

    hth,
    ---nimer
    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cur8gc$dkf$1@forums.macromedia.com...
    > Here's an example... Basically, depending on the values of some form
    > fields, I
    > may want to change the value of another forn element or change the actual
    > form
    > action. Or perhaps have a check to see if all the required fields in an
    > accordion page have been filled out, and if so, enable or make visible
    > some
    > additional information. Everything WILL be done within the flash form, but
    > the
    > checks do require if...else statements. :-( Thank you for your help all
    > day. I
    > truly appreciate it <cfform format='flash' width='250'> <cfinput
    > type='text'
    > name='prefix' label='Prefix'> <cfinput type='text' name='firstname'
    > label='First Name'> <cfinput type='text' name='lastname' label='Last
    > Name'>
    > <cfformitem type='hrule'></cfformitem> <cfinput type='text'
    > name='completename' label='Full Name' bind=' if( {prefix.text !=
    > undefined}
    > &amp;&amp; {firstname.text != undefined} &amp;&amp; lastname.text !=
    > undefined}
    > ) return {prefix.text} {lastname.text}, {firstname.text} else return 'Name
    > Not
    > Complete' '> </cfform>
    >

    Mike Nimer Guest

  2. Similar Questions and Discussions

    1. Flash form with cfinput validation not working
      when using a cfform with format flash and using a cfinput in that form the validate field does not work. but when using the same validation with a...
    2. Flash Form Validation
      Hi, I have a flash form as below. <cfform action="#CGI.SCRIPT_NAME#?event=users.passwordchangeaction" method="post" name="passwordchange"...
    3. Rich flash forms and validation functions
      Hi. I used to use the following to validate my forms: <!--- init form feilds ---> <cfparam name='form.FirstName' default=''> <cfparam...
    4. Validation with a flash form
      You need to do this with inline actionscript, instead of javascript. try this: <cfform format="flash"> <cfinput type="Text" name="jsPass1"...
    5. form validation in flash mx
      i've created a simple form in flash that is hooked to a scrpit that handles the information but i wish for flash to validate some basic info before...
  3. #2

    Default Re: flash form validation functions

    Thank you Mike, Awesome!!!
    jorgeloyo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139