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!

Similar Messages

  • 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

  • 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

  • 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...

  • Using Radio Buttons in widget to store Data

    I am building my 2nd widget and I am curious to know if anyone has used radio buttons within the edit mode to change/modify/set variables before. I don't want a radio button widget. I want a complex menu widget that will hide/show selected items within my playbar such as the forward button.
    Currently I am using User variables to determine all the hide/shows for my playbar. But I would like to make it more user friendly by having a visual widget people could use to turn buttons on off, set url's for help documents etc. And have everything be based on a per slide basis. just wondering if anyone has done anything like this in the past.
    The other part of this is, can I use a widget to construct User variables. In As2 I was able to create variables in root and then set those accordingly without having to add them to every projects user variables. But it appears in AS3 it is not possible to create a variable of a clip/objects parent is anyone familiar with this?
    Thanks ahead of time.
    zsrc

    Hi zsrc,
    If you're using WidgetFactory then here's a post that might give you the information that you need.
    http://www.infosemantics.com.au/widgetking/2010/11/widget-properties-how-theyre-used/
    As far as the code you'd write in your circumstance, a radio button's selected property tells you if it's... well... selected. So you can write that to a widget property like so:
    properties.MyPropertyName = myRadioButton.selected;
    That line would be inside the saveProperties template method as mentioned in the article above.
    override protected function saveProperties():void
        properties.MyPropertyName = myRadioButton.selected;
    Then you can read that property back when the widget is in the published Captivate movie.
    override protected function enterRuntime():void
       if (properties.MyPropertyName == true) {
          // The Radio Button was selected. Do stuff
       } else {
          // The Radio Button wasn't selected. Do stuff?

  • 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

  • How to use Radio buttons in WAD to select different condition in a query

    Hi Guru,
    I am new to WAD, I want to use radio buttons in selection screen of query for different selections based on selection criteria. I am aware of executing different queries using different radio buttons. but i want to use single queries for different radio button selections.
    I have found some relevant topic to it but not got exact solution. Please guide me.

    Hi Avinash,
    Drag a DropDown webitem into your template. Under DropDown webitem properties, Data Binding -> Fixed List of Options.
    Fixed Option -> Action -> Command via Command Wizard, Command -> Commands for Data Providers -> Data Provider Commands for Filter Values -> SET_SELECTION_STATE_SIMPLE. Data Provider Affected -> choose the main DP Query here. Characteristic -> choose Employee Group characteristic here as present in your DP Query. Sign -> INCLUDING, Operator -> EQUAL_SELECTION, Equals -> MEMBER_NAME, Member Name -> specify the value here i.e. Employee1 etc.
    Repeat above Fixed Option step for Employee2, Employee3 etc. selections. For 'All' option choose Command CLEAR_SELECTION_STATE with Data Provider Affected as the main DP Query & Characteristic as Employee Group.
    --Priya

  • How do I search a site using radio buttons

    I am trying to search a site using radio buttons. I have one table and 5 columns. I have 5 radio buttons marked like 01, 02, 03,04,05. I am using Dreamweaver cs5 php, when I click the radio button 01 I will like to get the response with all 01 files. I will like to mention that the file names are like 01-010-1, 01-010-2 and than 02-020-1 and so fourth I do not know how to write the advance query
    This is what I have
    SELECT QBF, ADDRESS, NATSO, TSOCNT, PDF (this re my db columns)
    FROM alldwgs (this is my table)
    WHERE QBF like %colname% (this is the column that contains the file names 01-010-1 etc)
    ORDER BY QBF ASC
    I don’t know what to write on the variable box
    Name: colname
    Type: text
    Default value: 01
    Run time value: $_GET['QBF']
    I hope that you understand my question I am new to this. Thank you very much for your response

    Thank you for your reply.  I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro.  When I try to edit the document it directs me to LiveCycle.  I cannot move the table in LiveCycle.  It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle.  Am going in circles.

  • 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.

  • Fillable forms with radio buttons (Using Adobe Reader X)

    I have two questions: First question, I have a fillable form with "yes" and "no" radio buttons. Currently the radio defaults to answer "yes", but I would like both the "yes" and "no" fields to be empty, which would allow the user to select an answer on his or her own.  Second question, is there a way to make an answer required before moving on to the next question?
    (Using Adobe Reader X)
    Message was edited by: mp2athome

    You need to check and make sure that the options  for each radio button do not have the "Button is checked by default" selected.
    You can make all the following answer radio buttons "read only" and only after one of the choices for the preceding question has been answered are the radio buttons for the next question are write enabled.
    You will need Acrobat to create the form.

  • Creating a form with radio buttons that users can fill, save, and e-mail back

    Hi all,
    I am new here, so please forgive me if this answer has already been answered. I have been looking around and still have not been able to find an answer.
    I have created a pdf in InDesign and opened it in Acrobat to create a form out of that existing PDF. The form needs to contain radio buttons and text fields. When I save it to test it out on Adobe Reader (for the typical user), it says that I am only allowed to save it in its original form (without any of the changes) thereby making this form useless (I do not want users to print it out; I'd like them to email the entire PDF back to me).
    I've looked online and found some answers saying that I would just need to enable commenting, but when I tried that, I could no longer select any of the radio buttons in Adobe Reader.
    Any suggestions?
    Thanks in advance.
    I'm on a Mac using Adobe Acrobat 7 Professional.

    You won't see that in 7. It didn't exist until Acrobat 8. Though It would work with PDF's opened by Reader 7.
    The only choice you have is connacting someone at Adob coporate and finding out how to sign up to a Service they have that will llow you to do that.
    Caution: its very, very expensive and unless  your fortune 1000 company you can't afford it.
    OR you could upgrade to Acrobat 10 (if you have a Machine capable of running it - Intel Only) or Acrobat 9 (PPC and INTEL).
    Note the feature they speak of only allows for 500 instances of any one PDF set up to do so.

  • PHP Form Validation: Radio Buttons

    Hey everyone -
    I'm trying to do two things here with an addition to one of
    my forms using
    PHP.
    1. Attempting to validate if one of the radio buttons has
    been selected.
    2. Displaying which radio button is selected once the page is
    reloaded
    (checking for validation errors). That is - if they've
    selected a radio
    button but didn't fill in the other area - I want the radio
    button they've
    already selected to be actually "selected" once the page
    reloads.
    Here is the series of radio buttons:
    <input type="radio" name="subject" id="subject1" value="1"
    />
    <label for="subject1" class="labelbold">I wish to
    contact you regarding
    website design</label><br />
    <input type="radio" name="subject" id="subject2" value="2"
    />
    <label for="subject2" class="labelbold">I wish to
    report a technical
    error</label><br />
    <input type="radio" name="subject" id="subject3" value="3"
    />
    <label for="subject3" class="labelbold">I wish to
    report an error with the
    copy</label><br />
    <input type="radio" name="subject" id="subject4" value="4"
    />
    <label for="subject4"
    class="labelbold">Other</label><br />
    This is how I'm validating my checkboxes:
    if($_POST['confirmbox'] == false) $error[] = "Check the
    Privacy Policy
    Agreement Box";
    However, using "false" doesn't seem to matter with the radio
    buttons. So,
    how can I get the radio buttons to validate that ONE was
    selected and how
    can I show that selected button on a page reload (I'm
    thinking I may need to
    dynamically generate the value=""....<?php...?>....?).
    Thanks!
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================

    Hello there -
    After no replies - I decided to strain my brain (ha-ha) - and
    finally
    figured out the solution to the problem.
    For the curious - I added this to each <input...>
    field:
    <?php if($_POST['subject'] == "1") echo'
    checked="checked"';?>
    And then for each <input...> I changed the "1" to the
    corresponding value
    each field was given.
    Have a wonderful night. :)
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "Shane H" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hey everyone -
    >
    > I'm trying to do two things here with an addition to one
    of my forms using
    > PHP.
    >
    > 1. Attempting to validate if one of the radio buttons
    has been selected.
    >
    > 2. Displaying which radio button is selected once the
    page is reloaded
    > (checking for validation errors). That is - if they've
    selected a radio
    > button but didn't fill in the other area - I want the
    radio button they've
    > already selected to be actually "selected" once the page
    reloads.
    >
    > Here is the series of radio buttons:
    >
    > <input type="radio" name="subject" id="subject1"
    value="1" />
    > <label for="subject1" class="labelbold">I wish to
    contact you regarding
    > website design</label><br />
    >
    > <input type="radio" name="subject" id="subject2"
    value="2" />
    > <label for="subject2" class="labelbold">I wish to
    report a technical
    > error</label><br />
    >
    > <input type="radio" name="subject" id="subject3"
    value="3" />
    > <label for="subject3" class="labelbold">I wish to
    report an error with the
    > copy</label><br />
    >
    > <input type="radio" name="subject" id="subject4"
    value="4" />
    > <label for="subject4"
    class="labelbold">Other</label><br />
    >
    > This is how I'm validating my checkboxes:
    >
    > if($_POST['confirmbox'] == false) $error[] = "Check the
    Privacy Policy
    > Agreement Box";
    >
    > However, using "false" doesn't seem to matter with the
    radio buttons. So,
    > how can I get the radio buttons to validate that ONE was
    selected and how
    > can I show that selected button on a page reload (I'm
    thinking I may need
    > to dynamically generate the
    value=""....<?php...?>....?).
    >
    > Thanks!
    >
    > --
    > Shane H
    > [email protected]
    >
    http://www.avenuedesigners.com
    >
    > =============================================
    > Proud GAWDS Member
    >
    http://www.gawds.org/showmember.php?memberid=1495
    >
    > Delivering accessible websites to all ...
    > =============================================
    >
    >
    >

  • Pre-populating forms with radio button values

    I have been pulling my hair out trying to figure out why my action page is not being pre-populate with the value that is passed from the radio button selection. Can get my hands around what I am actually doing wrong. I have changed my code several times and can not keep up with any more. So below, I have included the main page and the action page that needs to be pre-populated with the data from the database. Thank you in advance for you help and time.
    MAIN.cfm
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <!--- Declare and initialize the variables
    --->
    <cfset today = DateFormat(Now(),"mmmm d, yyyy")>
    <cfset current_time = TimeFormat(Now(),"h:mm tt")>
    <cfset application_name = "Corporate Intranet Directory">
             <cfset current_url ='http://'& #CGI.SERVER_NAME# & ':'& #CGI.SERVER_PORT# & #CGI.SCRIPT_NAME#>
    <cfset current_browser = #CGI.HTTP_USER_AGENT#>
    <html>
    <head>
    <title>Employee Directory</title>
    </head>
    <!--- Included heading for the page--->   
    <h1>Employee Directory</h1>
    <body>
    <!--- Display the today date and the current time--->
    <cfoutput>Today's date is #today#</cfoutput><br>
    <cfoutput>The current time is #current_time#</cfoutput><p>
    <!---Display the URL and Browser used for the template --->
    <p><cfoutput>URL of this template: #current_url#</cfoutput>
    <cfoutput>Browser used: #current_browser#</cfoutput></p>
    <!---Insert a field to have the user search by email address --->
    <tr bgcolor = "yellow">
    <td>Search</td>
    </tr><br>
    Email: <input type="text" name="EmailAddress"
    size="20" maxlength="100"><br>
    <input type="Submit" value="Search"><p>
    <!--- Query the Employees table to find the employee who's ManOfTheYear is set to "YES"--->  
    <cfquery name="employeeOfTheMonth" datasource="Directory">
        select
                e.FirstName,
                    e.LastName
                from
                Employees e
                where
                e.ManOfTheMonth = 'Yes'
            </cfquery>             
    <!--- Query the Employees and Departments tables to find employee's First Name, Last Name, Title, Phone Extension, Email Address, and Department Name--->      
    <cfquery name="employees" datasource="Directory">
    select
    e.EmployeeID,
    e.FirstName,
    e.LastName,
    e.Title,
                    e.PhoneExtension,
                    e.EmailAddress,
                    d.DepartmentName,
    d.DepartmentID
    from
    Employees e,
                    Departments d
                where
                e.DepartmentID = d.DepartmentID
    </cfquery>
    <table border="2" bordercolor="blue">
    <!--- Display the Employee of the Month--->   
              <cfoutput query="employeeOfTheMonth">
    <tr>
                <th align="center" colspan="5">Employee of the Month: #employeeOfTheMonth.FirstName# #employeeOfTheMonth.LastName# </th>
                </tr>
                </cfoutput>
                <tr>
    <th>ID</th>
    <th>Name</th>
    <th>Title</th>
    <th>Department</th>
    <th>Phone Extension</th>
                    <th>Email</th>
    </tr>
    <!--- Display the First Name, Last Name, Title, Department Name, Phone Extension, and Email Address--->   
    <form action="admin3.cfm?EmployeeID=#EmployeeID#" method="post">
    <cfoutput query="employees">
    <cfswitch expression="#DepartmentID#">
        <cfcase value="1">
           <cfset backgroundcolor="00FFFF">
       </cfcase>
    <cfcase value="2">
           <cfset backgroundcolor="ff6699">
       </cfcase>
    <cfcase value="3">
           <cfset backgroundcolor="99ff99">
       </cfcase>
    <cfcase value="4">
           <cfset backgroundcolor="ffcc99">
       </cfcase>
    <cfcase value="5">
           <cfset backgroundcolor="cc99ff">
       </cfcase>
        <cfdefaultcase>
            <cfset backgroundcolor="red">
        </cfdefaultcase>
    </cfswitch>
    <tr bgcolor=#backgroundcolor#>
    <td><input type ="radio" name="EmployeeID" value="#employees.EmployeeID#"</td>
    <td><a href="http://localhost:8500/spiderbytes/assignments/employee_details.cfm?EmployeeID=#EmployeeID#"> #employees.FirstName# #employees.LastName#</td>
    <td>#employees.Title#</td>
                    <td>#employees.DepartmentName#</td>
    <td>#employees.PhoneExtension#</td>
                        <td>#employees.EmailAddress#</td>
    </tr>
    </cfoutput>
    <tr>
    <!--- Display the number of employee's in the directory--->
    <td align="right" colspan="5"><cfoutput>#employees.recordCount# Employee(s) found.</cfoutput></td>
    </tr>
    </table>
    <input type="Submit" name="Action" value="Add New Employee">
    <input type="Submit" name="Action" value="Edit Employee">
    <input type="Submit" name="Action" value="Delete Employee"><p>
    </form>
    <!--- Include a footer --->
    <CFINCLUDE template="footer.cfm">
    </body>
    </html>
    ADMIN.cfm
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Add New Employee</title>
    </head>
    <body>
    <CFIF ISDEFINED("Action")>
    <!--- Use the "Action" variable to display the same name as a heading --->
    <h1><CFOUTPUT>#Action#</CFOUTPUT></h1>
    <!--- Determine if the user select Edit Employee or Delete Employee --->
    <CFIF Action IS "Edit Employee" OR Action IS "Delete Employee">
    <!--- Query the database to get the data for current employee the user
    selected--->
    <cfquery name="DisplayEmployeeRecord" datasource="Directory">
    SELECT *
    FROM Employees
    Where EmployeeID = #EmployeeID#
    </cfquery>
    <cfoutput query="DisplayEmployeeRecord">
    <cfset variable.EmployeeID = "#EmployeeID#">
    <cfset variable.FirstName = "#FirstName#">
    <cfset variable.LastName = "#LastName#">
    <cfset variable.DepartmentID = "#DepartmentID#">
    <cfset variable.Title = "#Title#">
    <cfset variable.Salary = "#Salary#">
    <cfset variable.PhoneExtension = "#PhoneExtension#">
    <cfset variable.HomeAddress = "#HomeAddress#">
    </cfoutput>
    </CFIF>
    <form action="query.cfm" method="post">
    <table border="2">
    <!--- Server-Side Validation - First Name, Last Name, Department, and and Email Address are required
    fields --->
    <input type="hidden" name="EmployeeID_required" value="First Name is
    a required field">
    <input type="hidden" name="FirstName_required" value="First Name is
    a required field">
    <input type="hidden" name="LastName_required" value="Last Name is
    a required field">
    <input type="hidden" name="DepartmentID_required" value=" Department ID is
    a required field - Please fill in the coorsponding Department ID for the employee">
    <input type="hidden" name="EmailAddress_required" value="Email Address is
    a required field">
    <!--- Create a table for the names of the fields and the textbox --->
    <tr>
    <td>
    First Name (required): </td>
    <td><input type="Text"
    name="FirstName" size="35" maxlength="35"><br></td>
    </tr>
    <tr>
    <td>
    Last Name (required): </td>
    <td><input type="Text" name="LastName"
    size="35" maxlength="35"><br></td>
    </tr>
    <tr>
    <td>
    Department Number (required): </td>
    <td><input type="Text"
    name="DepartmentID" size="35" maxlength="4"><br></td>
    </tr>
    <tr>
    <td>
    Title: </td>
    <td><input type="Text"
    name="Title" size="35" maxlength="35"><br></td>
    </tr>
    <tr>
    <td>
    Salary: </td>
    <td><input type="Text" name="Salary"
    size="35" maxlength="10"><br></td>
    </tr>
    <tr>
    <td>
    Email (required): </td>
    <td><input type="Text" name="EmailAddress"
    size="35" maxlength="35"><br></td>
    </tr>
    <tr>
    <td>
    Work Phone: </td>
    <td><input type="Text" name="PhoneExtension"
    size="35" maxlength="10"><br></td>
    </tr>
    <tr>
    <td>
    Address: </td>
    <td><input type="Text" name="HomeAddress"
    size="35" maxlength="50"><br></td>
    </tr>
    <!--- Adds the new employee to the Directory database---> 
    <tr>
    <th align "center" colspan ="2">
    <br><input type="Submit" name="Action" value="<cfoutput>#Action#</cfoutput>">
    </th>
    </tr>
    </table>
    </form>
    <!--- Include a footer --->
    <CFINCLUDE template="footer.cfm">
    </body>
    </html>
    </CFIF>

    Thanks for your reply.  The radio button was placed inside the anchor so that when the user selects that employee, it will pre-populate the from base upon the "Action" selected (i.e. Edit Employee and Delete Employee).  I quite sure this can be done with out using javascript.  I know that I accomplish this by using a drop-down list, but I would like to use the radio buttons instead because I would have to change my code.
    Here is the  code with the radio button:
    <tr bgcolor=#backgroundcolor#>
    <td><input type ="radio" name="EmployeeID" value="#employees.EmployeeID#"</td>
    <td><a href="http://localhost:8500/spiderbytes/assignments/employee_details.cfm?EmployeeID=#EmployeeID#"> #employees.FirstName# #employees.LastName#</td>
    <td>#employees.Title#</td>
                    <td>#employees.DepartmentName#</td>
    <td>#employees.PhoneExtension#</td>
                        <td>#employees.EmailAddress#</td>
    </tr>
    Here is are some ways that I coded my form action is coded:
    <form action="admin3.cfm" method="post">  OR
    <form action="admin3.cfm?EmployeeID =# EmployeeID#" method="post">

  • Acrobat 9 : How to modify subject & body of email when using send button in PDF

    Hello,
    I have to create several PDF forms who will be send to my mailadress.
    I already googled a lot but can't find a way to modifiy the subject of the mail and the bodytext of the mail when I use the send button in the purple bar on top of the PDF form.
    My acrobat 9 "speaks Dutch and says :
    Mailsubject: Ingevulde formulieren verzenden
    Body tekst: Instructies voor het toevoegen van het formulier aan een reactiebestand.
    Dubbelklik op de bijlage.
    Acrobat vraagt u een reactiebestand te selecteren.
    I managed to create a send button "in" the PDF with a javascript
    this.mailDoc({bUI: true, cTo: "[email protected]", cSubject: "My own subject ", cMsg: "blah blah blah"});
    But this has no influence on the top button and it also does not check if the mandatory fields are filled.
    Can anyone help ?
    Thanks

    When you distribute a form using the distribute process, Acrobat replaces whatever code you placed in the button with its own. You do not need to use the distribution process to set this up. Instead, Reader-enable the form and your button should work like you want.

Maybe you are looking for