Dynamic forms using radio buttons, any ideas?

Hello;
I am writting a multi-form section in a web site. I have the
form built up to the point where it sends the email. I have some
issues I am trying to figure out and need some help. First let me
show how this is set up, then the questions:
The set up:
Page 1 personal info
<cfform action="PT2.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="sponsorOrder"
enablecab="no">
all the form fields that need to be filled for contact info
here
<input type="reset" name="Reset" value="Reset">
<input type="submit" name="Submit" value="Proceed to Step
2">
</cfform>
PAGE 2:
<cfform action="SENDMAIL.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="sponsorOrder"
enablecab="no">
<input name="Fname" type="hidden"
value="<cfoutput>#form.Fname#</cfoutput>">
<!-- all the other hidden fields from page 1 go here
--->
<input type="radio" name="sponsor" value="1">
<input type="radio" name="sponsor" value="2">
<!-- there are 7 radio buttons to select from on this
page. All with the same name="sponsor" -->
<input type="reset" name="Reset" value="Reset">
<input type="submit" name="Submit" value="Submit">
</cfform>
SENDMAIL page:
<cfset subject = "Sponsorship Order">
<cfset email = "#form.email#">
<!----------------------------------------------------------------------->
<cfmail to="[email protected]"
cc="[email protected]"
from="#form.email#"
subject="Custom Order Request"
server="mail.myserver.com"
port=25
type="HTML">
<font face="Verdana, Arial, Helvetica, sans-serif"
color="##000000" size="2">
<b>Collected information</b><br>
<b>Customer First Name:</b>
#form.Fname#<br>
<!-- all the rest of the collected contact info goes here
-->
<!-- HOW do I bring in the radio button choice here? Is
this the right way? -->
<cfif "form.sponsor" = "1">
<b>Selection 1:</b> the info they get from
selection 1 here <br>
</cfif>
<cfif "form.sponsor" = "2">
<b>Selection 2:</b>The info that goes with
selection 2 goes here<br>
</cfif>
<!-- there are 5 more if statements that need to run here
for the rest of the radio selections -->
</cfmail>
<cfinclude template="thankyou.cfm">
THANK YOU PAGE:
Now on this page is where I get lost. I need to bring the
selection from the radio buttons over to here and serve up a button
according to the radio button selected back on page 2. Is this how
I do that? The same as I did in the sendmail?
<cfif "form.sponsor" = "1">
they get this button and info
</cfif>
<cfif "form.sponsor" = "2">
they get this button and info
</cfif>
<!-- and it goes on for 5 more selections -->
Those are my questions, as well as this.
On page 2 I need to make it impossible to pass that page
without making a selection. How do I do that with radio buttons?
Can anyone help me?
Thank you.
Phoenix

Irish-Phoenix wrote:
> Hello;
> I am writting a multi-form section in a web site. I have
the form built up to
> the point where it sends the email. I have some issues I
am trying to figure
> out and need some help. First let me show how this is
set up, then the
> questions:
>
> The set up:
> Page 1 personal info
>
> <cfform action="PT2.cfm" method="post"
> enctype="application/x-www-form-urlencoded"
name="sponsorOrder" enablecab="no">
>
> all the form fields that need to be filled for contact
info here
>
> <input type="reset" name="Reset" value="Reset">
> <input type="submit" name="Submit" value="Proceed to
Step 2">
> </cfform>
>
> PAGE 2:
>
> <cfform action="SENDMAIL.cfm" method="post"
> enctype="application/x-www-form-urlencoded"
name="sponsorOrder" enablecab="no">
> <input name="Fname" type="hidden"
value="<cfoutput>#form.Fname#</cfoutput>">
> <!-- all the other hidden fields from page 1 go here
--->
> <input type="radio" name="sponsor" value="1">
> <input type="radio" name="sponsor" value="2">
> <!-- there are 7 radio buttons to select from on this
page. All with the same
> name="sponsor" -->
> <input type="reset" name="Reset" value="Reset">
> <input type="submit" name="Submit" value="Submit">
> </cfform>
>
> SENDMAIL page:
> <cfset subject = "Sponsorship Order">
> <cfset email = "#form.email#">
>
<!----------------------------------------------------------------------->
> <cfmail to="[email protected]"
> cc="[email protected]"
> from="#form.email#"
> subject="Custom Order Request"
> server="mail.myserver.com"
> port=25
> type="HTML">
> <font face="Verdana, Arial, Helvetica, sans-serif"
color="##000000" size="2">
>
Collected information<br>
>
Customer First Name: #form.Fname#<br>
> <!-- all the rest of the collected contact info goes
here -->
>
> <!-- HOW do I bring in the radio button choice here?
Is this the right way? -->
> <cfif "form.sponsor" = "1">
>
Selection 1: the info they get from selection 1 here
<br>
> </cfif>
> <cfif "form.sponsor" = "2">
>
Selection 2:The info that goes with selection 2 goes
here<br>
> </cfif>
> <!-- there are 5 more if statements that need to run
here for the rest of the
> radio selections -->
> </cfmail>
> <cfinclude template="thankyou.cfm">
>
> THANK YOU PAGE:
>
> Now on this page is where I get lost. I need to bring
the selection from the
> radio buttons over to here and serve up a button
according to the radio button
> selected back on page 2. Is this how I do that? The same
as I did in the
> sendmail?
>
> <cfif "form.sponsor" = "1">
> they get this button and info
> </cfif>
> <cfif "form.sponsor" = "2">
> they get this button and info
> </cfif>
> <!-- and it goes on for 5 more selections -->
>
> Those are my questions, as well as this.
> On page 2 I need to make it impossible to pass that page
without making a
> selection. How do I do that with radio buttons?
> Can anyone help me?
> Thank you.
>
> Phoenix
>
hi phoenix!
ok, let's see...
your "thank you" page is cfincluded in the "sendmail" page,
so it will
have all the passed form vars available to it, which means
you do not
have to store the radio button selection in the session scope
or
anywhere else...
i think a cfswitch/cfcase construct to check for selected
radio button
will serve you better than lots of cfif/cfelseif/cfelse...
as for preventing submission of page2 without selecting a
radio button
first:
a) pre-select one
b) use client-side javascript to make sure one is selected
(use an
onsubmit event in the form tag or onclick event in the button
- you will
have to change the button type from submit to button, and
change its
name from submit to something else - there are possible
issues with
having a button named submit in your form if you are
suibmitting the
form through js...
c) you could also use server-side cfml to check that a radio
button is
selected but it requires a lot of extra code and changes to
your
forms/pages...
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com

Similar Messages

  • Email form using radio buttons

    Hello! I hope someone can help me out with this one!! I will
    start off by saying that I don't know too much about action script,
    but i have created a Flash email form with just text fields that
    has worked. Now I need to create a form with three sets of radio
    button groups. I need to pass the variables to a php email script.
    Can anyone guide me through this?

    THanks for you help Rob, but I still can't get it to work
    correctly. I'm not getting any email at all. I have a radio button
    group set up. The groupName is "Group1". Then there is a results
    text area on the screen with a var name of "results_ta". My email
    text area's var = "email_ti". I have a submit button component on
    the screen as well. The instance name is "submit_button". Below is
    the flash code that is on the first frame of my movie:
    var submitListener:Object = new Object();
    submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    result_ta.text = result_lv.welcomeMessage;
    } else {
    result_ta.text = "Error connecting to server.";
    var send_lv:LoadVars = new LoadVars();
    send_lv.email = email_ti.text;
    send_lv.radioOne = group1.selection.data;
    send_lv.sendAndLoad("sendmail.php", result_lv, "POST");
    //send_lv.sendAndLoad("sendmail.php", "POST");
    submit_button.addEventListener("click", submitListener);
    stop();
    Next my php code is as follows:
    <?php
    $sendTo = "[email protected]";
    $subject = "My Flash site reply";
    $headers = "From: " . $_POST["email"] ."\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= "Return-path: " . $_POST["email"];
    $message = $_POST["radioOne"];
    mail($sendTo, $from, $subject, $message, $headers);
    ?>
    Do you see anything that is off? I think I've lost it,
    because I had an email being sent, it just didn't add any of the
    info, but now I'm not even getting an email sent!! I'm in despair
    because the project is due tomorrow!!!
    thanks!

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

  • With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?

    With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?
    I have developed a form with fields hidden by default, that become visible based on box ticked or radio button selections.
    My problem is that, when I close the form and re-open it, it comes back to it's default presentation, regardless of the information already recorded in the form (including in the now hidden fields.
    How to correct that
    Thanks in advance for any hint you can provide.

    I've had the same problem. This solved it...
    Go to the "Form properties..." in the File-menu. Select "Run-time" to the left and in the box "Scripting" Preserve scripting changes to form when saved: choose Automatically (Script-based state changes are saved locally in an insecure fashion. This option cannot be used for certified forms).
    Hope it works for you to...

  • Related selects using radio button

    Hi All,
    I wanna use radio button with three options and one dropdown
    box .
    my problem is i wanna choose option from radio button and run
    the related query to get the values into dropdown box and then
    choose the value from drop down and submit it to another page.
    Any ideas ? please help me.
    Thanks in advance

    Google coldfusion related selects and adjust the javascript
    so that you are using radio buttons instead of a select.
    I recently posted my own code. Look for the keyword
    etiologydetail.

  • I am trying to set up my newly purchased Apple TV but when I enter my network password while setting up, I am not able to enter the Submit button, any idea how to hit the visible submit button that is visible on screen but not responding?

    I am trying to set up my newly purchased Apple TV but when I enter my network password while setting up, I am not able to enter the Submit button, any idea how to hit the visible submit button that is visible on screen but not responding?

    You need to use the right arrow on the remote to go all the way to the right. The submit button will be highlighted and you can then press select on the remote to proceed.

  • Ipad mini screen keeps moving around and switching screens as though someone else is using it? any ideas what is going on?

    Ipad mini screen keeps moving around as though someone else is fiddling with it while I am using it. Any ideas what is goi g on?

    Hi Deeveeay,
    Try resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). When the Home screen redisplays, see if the issue has resolved itself.
    Cheers,
    GB

  • HT3180 struggling to wake my apple tv wont respond even when holding the menu and down button any ideas ?

    struggling to wake my apple tv wont respond even when holding the menu and down button any ideas ?

    Did you try unplugging the unit from power, leaving it for ten minutes, then plugging in again?
    If you have & it didn't work, Damian Smith1 posted this possible solution (I like to give credit where credit is due).
    Connect your ATV to your computer and try restoring it to factory setting Use the link below to walk you through the process
    Apple TV (2nd generation): Restoring your Apple TV
    support.apple.com/kb/HT4367

  • Dynamic table with radio buttons

    I need to load a dynamic table with radio buttons that allow
    the user to select an item in the table. I need to have it add a
    radio button with a unique identifier for each table item.
    For example: the table will load all of the seminars
    locations available in a certain state, the radio button will allow
    the user to select the city in which they would like to attend and
    that value will get passed to the registration page. The value of
    each radio button would be equal to the location_id in the database
    for each of the locations in the table (The table includes the
    date, day, venue, address, hotel info, etc. details for each city.)
    When I add dynamic radio buttons and set the value to the
    location_id in the database, it allows the user to select multiple
    radio buttons. I cannot find any information on how to
    resolve.....??
    Any help is appreciated.

    beanieboo wrote:
    > I need to load a dynamic table with radio buttons that
    allow the user to select
    > an item in the table. I need to have it add a radio
    button with a unique
    > identifier for each table item.
    >
    > For example: the table will load all of the seminars
    locations available in a
    > certain state, the radio button will allow the user to
    select the city in which
    > they would like to attend and that value will get passed
    to the registration
    > page. The value of each radio button would be equal to
    the location_id in the
    > database for each of the locations in the table (The
    table includes the date,
    > day, venue, address, hotel info, etc. details for each
    city.)
    >
    > When I add dynamic radio buttons and set the value to
    the location_id in the
    > database, it allows the user to select multiple radio
    buttons. I cannot find
    > any information on how to resolve.....??
    > Any help is appreciated.
    Give each radio button the same name
    <input type="radio" name=theLocation" value="<?php
    $recordset['location_id'] ?>">
    Mick

  • Updated to iOS 7.1 and my location arrow won't turn off. It used to. Any ideas?

    Updated to iOS 7.1 and my location arrow won't turn off. It used to. Any ideas? Help would be appreciated!

    Check in Settings > Privacy > Location Services to see which apps are using Location Services. Turn off those you don't want or need.
    Also be sure to close apps you are not using by double=tapping the Home button and swiping apps up.

  • Issue in using radio button in module pool

    For same field I need 2 different search help. Based on radio button on screen I need company codeu2019s from different table. Issue is, at execution radio button remains blank. Radio button works only when I use them in PAI under CASE SY-UCOMM. WHEN u2018DONEu2019. IF Normal_Run = u2018Xu2019u2026u2026
    Can I use radio button with the below code. Please refer the below code.
    PROCESS ON VALUE-REQUEST.
    FIELD COMP_CODE MODULE POPULATE_COMP_CODE.
    MODULE POPULATE_COMP_CODE INPUT.
    IF REPEAT_RUN = 'X'.
    PERFORM COMP_CODE_POPULATE.
    ELSEIF NORMAL_RUN = 'X'.
    PERFORM COMP_CODE_POPULATE_N.
    ENDIF.
    ENDMODULE.  
    FORM COMP_CODE_POPULATE .
        SELECT COMP_CODE
          FROM  ZIFRS_D_PROCESS
          INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB_CC
          WHERE PROC_NAME = 'DEPRECIATION RUN'.
      READ TABLE VALUES_TAB INDEX 1.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD    = 'COMP_CODE'
          DYNPPROG    = PROGNAME
          DYNPNR      = DYNNUM
          DYNPROFIELD = 'COMP_CODE'
          VALUE_ORG   = 'S'
        TABLES
          VALUE_TAB   = VALUES_TAB_CC.
    ENDFORM.                    " COMP_CODE_POPULATION
    FORM COMP_CODE_POPULATE_N .
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          TABNAME     = '/BI0/SCOMP_CODE'
          FIELDNAME   = 'COMP_CODE'
          DYNPPROG    = PROGNAME
          DYNPNR      = DYNNUM
          DYNPROFIELD = 'COMP_CODE'.
    ENDFORM.                    " COMP_CODE_POPULATE_N
    Moderator Message: Please use "code" tags to format the code snippet.
    Edited by: Suhas Saha on Nov 23, 2011 5:13 PM

    Hi
    You need to make the Grouping for these Radio button on the screen
    Search for how to make Radio buttons grouping
    radio buttons in screen painter
    http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCDWBTUT/BCDWBTUT.pdf
    and search for Radio button Group in this document
    assign a Function Code for one of the radio buttons(It allows for only one Radio Button)
    This triggers automatic PAI so when you take the F4 Help this is readily available
    In TOP include make sure you define the variables corresponding to the Radio buttons on the screen and also provide default value X to one of the Radio buttons
    Hope this serves your purpose
    Cheerz
    Ramchander Rao.K

  • I want to build a form with radio buttons to limited clients ticking every option.

    I want to build a form with radio buttons to limited clients ticking every option. I have a range of products and in order to quote accurately I want to get specific information.

    If I get this , you want to show form options to specific clients not to all site viewers ?
    You would need to create a secure zone for this where permitted viewers can login and view the form with all options , in form itself we cannot setup this as few customers will view other options and others will view a different one.
    This can be done from your hosting end. Or if you are using Adobe server for hosting then you can create some profiles for customers and then setup a separate form altogether to achieve this.
    Thanks,
    Sanjit

  • Dynamic creation of Radio Button Group

    Hi,
    I need to create a Radio Button Group dynamically and add Radio buttons to it.
    I am able to create the Radio buttons dynamically. Could someone help me how to create Radio Button Groups.
    I tried creating the Radio Button Group using the following code
                  DATA : lr_radiobuttongrp type REF TO CL_WD_RADIOBUTTON_GROUP_BY_IDX.
                  call method CL_WD_RADIOBUTTON_GROUP_BY_IDX=>NEW_RADIOBUTTON_GROUP_BY_IDX
                  EXPORTING
                    bind_texts = 'test'
                  RECEIVING
                    control = lr_radiobuttongrp.
                  cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_radiobuttongrp ).
                  lr_container->add_child( lr_radiobuttongrp ).
    But when I run it I am geting a dump "subnode viewname.ME does not exist".
    Thanks,
    Suvarna.
    Edited by: Suvarna Chittor on Aug 12, 2008 12:10 PM

    what is 'test' in bind text parameter
    you should provide the name in Capitals along with the node name,
    if the node name is TEXTS and the context attribute under this node is TEXT then you have to pass
    TEXTS.TEXT
    also provide the VIEW parameter to the call
    Abhi
    Edited by: Abhimanyu Lagishetti on Aug 12, 2008 12:26 PM

  • Have not been able to use keynote if it's linked to icloud. It just starts and turns off quickly.  No problem if I toggle off using icloud. Any ideas.

    Have not been able to use keynote if it's linked to icloud. It just starts and turns off quickly.  No problem if I toggle off using icloud. Any ideas.

    Have you updated to the latest level of Keynote on your iPad? Keynote 2.0.1 (1075)  - Check Settings > Keynote
    If so, there isn't much that you can do other than report this bug to Apple http://www.apple.com/feedback/ipad.html
    You could try restarting or resetting your iPad.
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).

  • How to use Radio Buttons in SAP BI 7 for a set of three fields?

    Dear SAP Gurus,
    We are using SAP BI 7. We need to use Radio button to select one field name (out of a set of three fields) which
    appeared on selection screen.
    The scenario is; we have three fields
    1) Field Name A
    2) Field Name B
    3) Field Name C
    Now, we need to select one field(using Radio button) from the above and later the report related to the above
    selected field should be displayed.
    The three reports will be as follows:
    1) Report A
    2) Report B
    3) Report C
    if Field Name A  is selected then Report A  will be displayed,
    if Field Name B  is selected then Report B  will be displayed and
    if Field Name C  is selected then Report C  will be displayed.
    To display the report we have two cases;
    1) There will be a common selection screen and all the three reports will come in single workbook but in seperate worksheet.
    2) There will be a common selection screen and all the three reports will come in same worksheet, one after the other.
    Is it possible to create the report in this manner, if yes, please suggest the steps.
    Regards,
    DV.

    I think you would just use commands to do the following:
    1. Hide report Analysis Item 2 and Analysis Item 3 if the 1st button was pushed.
    2. Hide report Analysis Item 1 and Analysis Item 3 if the 2nd button was pushed.
    3. Hide report Analysis Item 1 and Analysis Item 2 if the 3rd button was pushed.
    Hope that helps...

Maybe you are looking for

  • Automatic creation of production orders via planned orders

    Hello experts! is there a way via customizing to trigger an automatic creation of production order from a planned order when the planned order finished date is within the next week? thanks

  • Dummy Guide needed for converting AS2 code into AS3

    I have to convert my existing AS2 code into AS3, but I might as well be reading chinese. I never even began to learn AS3, it was still fairly new at the time and the class ended before we had an opportunity to even touch on it. My major was not web d

  • ORABPEL-09503 Invalid xpath expression in a CASE expression

    Hi I have the following case statement in my BPEL process - <switch name="checkAuthenticateResult"> <case condition="upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS'

  • Imac/Keyboard Problem

    Im having a problem with my keyboard, but i didnt put this a nother forums becuase i tested a couple of diffrent keyboards and they all have the same problem. The problem is that the enter key doesnt work, the one on the num-pad works but the regular

  • Not a problem, just curious

    Hey all... a few times now I have packed up the Apple TV and headed over to a buddy's place to watch some movies. Up until last night, didn't really put much thought into it, but last night it suddenly occurred to me... I never set the ATV up to work