Flash Forms : conditional cfformgroups possible?

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

  1. #1

    Default Flash Forms : conditional cfformgroups possible?

    Hi,

    I'm trying to get conditional cfformgroups within a flash form.
    For example if someone clicks on radio button named Marketing then a
    cfformgroup is displayed with marketing details.
    The code below doesn't work unless you comment out the "onclick" event.

    <cfform method="get" preservedata="true" preloader="no" format="Flash"
    skin="haloSilver">
    <cfformgroup type="accordion">
    <cfformgroup type="page">

    <!--- Panel One --->
    <cfformgroup type="panel" visible="yes" name="panelone">
    <cfinput type="radio" name="jobtype" value="Marketing" Label="Marketing"
    onClick="paneltwo.visible = true">
    <cfinput type="radio" name="jobtype" value="IT" Label="IT"
    onClick="panelthree.visible = true">
    </cfformgroup>
    <!--- Panel One End --->

    <!--- Panel Two --->
    <cfformgroup type="panel" visible="no" name="paneltwo" >

    </cfformgroup>
    <!--- Panel Two End --->

    <!--- Panel Three --->
    <cfformgroup type="panel" visible="no" name="panelthree" >

    </cfformgroup>
    <!--- Panel Three End --->

    </cfformgroup>
    </cfformgroup>
    </cfform>

    Is there anyway of showing a cfformgroup based on input from the user?
    Looking forward to your thoughts.
    Stewart


    Stewart Steel Guest

  2. Similar Questions and Discussions

    1. conditional data binding in flash form
      I am having trouble with grid binding in a flash form. When an item is selected in the grid, Detailed info will show up in the panel below the grid....
    2. Converting existing forms to the Flash forms
      I have forms and I change all the tags on them, but they don't change to the new 'Flash forms' in CFMX 7. Any ideas on this?
    3. EMBEDDING FLASH MOVIES INTO FLASH FORMS
      Is there a way? EMBEDDING FLASH MOVIES INTO FLASH FORMS
    4. Flash Form conditional display
      I'm trying to create a form that displays different variations of text input fields as a function of radio button choices. Example: if a user...
    5. Can you use flash forms on a cd
      Hi, I want to create a form on a cd that the customer can fill in and send the information to us. Does anyone know how to get the information sent...
  3. #2

    Default Re: Flash Forms : conditional cfformgroups possible?

    The problem is the cffromgroups don't have an ID attribute, so you can't
    script access to them. There is an enhancement request for this, that will
    allow you to set the id attribute, so you can script it.

    hth,
    ---nimer

    "Stewart Steel" <stewart@reremovevebiscuitmedia.com> wrote in message
    news:d02sfb$rna$1@forums.macromedia.com...
    > Hi,
    >
    > I'm trying to get conditional cfformgroups within a flash form.
    > For example if someone clicks on radio button named Marketing then a
    > cfformgroup is displayed with marketing details.
    > The code below doesn't work unless you comment out the "onclick" event.
    >
    > <cfform method="get" preservedata="true" preloader="no" format="Flash"
    > skin="haloSilver">
    > <cfformgroup type="accordion">
    > <cfformgroup type="page">
    >
    > <!--- Panel One --->
    > <cfformgroup type="panel" visible="yes" name="panelone">
    > <cfinput type="radio" name="jobtype" value="Marketing" Label="Marketing"
    > onClick="paneltwo.visible = true">
    > <cfinput type="radio" name="jobtype" value="IT" Label="IT"
    > onClick="panelthree.visible = true">
    > </cfformgroup>
    > <!--- Panel One End --->
    >
    > <!--- Panel Two --->
    > <cfformgroup type="panel" visible="no" name="paneltwo" >
    >
    > </cfformgroup>
    > <!--- Panel Two End --->
    >
    > <!--- Panel Three --->
    > <cfformgroup type="panel" visible="no" name="panelthree" >
    >
    > </cfformgroup>
    > <!--- Panel Three End --->
    >
    > </cfformgroup>
    > </cfformgroup>
    > </cfform>
    >
    > Is there anyway of showing a cfformgroup based on input from the user?
    > Looking forward to your thoughts.
    > Stewart
    >

    Mike Nimer Guest

  4. #3

    Default Re: Flash Forms : conditional cfformgroups possible?

    I was reading another thread and apparently there is an "id" parameter that
    can be used with "cfformgroup". For whatever reason it is not revealed in the
    tag completion assist or in help.

    So in the original script you could change the "accordian" group to be:-

    <cfformgroup type="accordian" id="accordianGroup">

    With your onclick event you could put in a script that says:-

    onclick="accordianGroup[1].enabled=false"

    (Assuming you wanted to disable "paneltwo").

    However, the only thing that happens is that the input fields within
    "paneltwo" become disabled. The tab for "paneltwo" does not disappear, or
    anything like that.

    I am still not sure what the "visible" parameter does since setting it to
    "yes/no" "true/false" does not seem to have any effect on what you see, or
    don't.

    Please do bear in mind that I am a Flash/ActionScript/Flex newbie and that I
    am still learning as I go.

    rrhb59 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