Passing form variables

HI~
I have a cfform on my index.cfm page, and the action is set
to go to a confirm.cfm page. On that page, I want the user to be
able to look at the information they entered into the form, and
then hit "Submit" if it is correct. Right now, I am able to display
the form information on the confirm.cfm page, but I'm having a hard
time with my insert statement. Right now, when I hit the final
Submit button, an entry is made in the database, but none of the
variables are passed. I'm guessing this is because of the cfparam
default="" setting, but I don't know what else to set it as-- if I
try to set it as semester or form.semester, it says it is not
defined. Please help! Thanks!

semi star gazer wrote:
> OK, I think I'm still missing something here. This is
what I have right now.
> With this code, I get a blank entry in the database when
the user hits the
> Submit button.
>
> <cfparam name="form.semester" default="">
>
> <cfif isDefined("form.submitEval")>
>
> <!--- insert form data into database --->
> <cfquery name="insertEval" datasource="intern">
> INSERT INTO mentorEvals (
> semester
> ) VALUES (
> '#Trim(form.semester)#'
> )
> </cfquery>
>
> <cfform action="#CGI.SCRIPT_NAME#" name="submitEval"
METHOD="post">
> <cfinput type="hidden" name="semester"
value="form.semester">
> <!--- Submit Button that reads "Submit Evaluation"
--->
> <cfinput type="submit" value="Submit Evaluation"
name="submitEval"
> id="submitEval">
> </cfform>
>
try using <input type="hidden" ...> instead of
<cfinput ...> - i seem to
recall there being issues with hidden cfinput fields...
also - where's your closing </cfif>??? it should be
after </cfquery> - i
hope it is actually there...
just to make sure semester is passed from first form, you can
put
<cfoutput>#form.semester#</cfoutput> right after
your <cfparam>
NOTE: you do not really need that <cfparam> there... it
does not do
anything... unless you are planning to use it later for
validation
routines... i wonder if it may be tampering with the semester
value...
it shouldn't, but who knows...
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com

Similar Messages

  • CAN I PASS FORM VARIABLES TO THE DATABASE PROCEDURE IN PERSONALIZATION

    When I try to use form variable in the database procedure call from personalization I get the attached error.
    Under forms personalization
    From Actions tab --> builtin --> Execute Procedure when I call a database procedure and pass one of the form variable as parameter I get "ora-01008 couldn't be validate" error
    Can we pass on form variables to the database package using personalization ? If yes, then is this the right way?
    Message was edited by:
    omitchel

    I tried customizing the Quoting Form, it works.
    What you have done is correct, but this is how you call it
    ='begin
    db_proc('''||${item.qothddet_main.quote_name.value}||''');
    end'
    here
    qothddet_main : block name
    quote_name : item name
    Thanks
    Tapash

  • Passing form variables in a single form

    I am trying to make a form to select a starting and ending
    month for a event search.
    I have 2 list boxes populated with the months, but I want the
    second box to begin from the first selection.
    So if the user selects may in the first box, the second box
    should list from may to december.
    Is there any way to pass a form variable to another field
    inside the same form?
    I want to use a conditional <cfloop> to populate the
    second box like <cfloop from= #variableA# to= 12>
    then have the <options> inside the loop.
    Thanks in advance for any help you can provide...this one has
    me stumped!

    You can do it with javascript. Google related selects, there
    are lot's of examples out there.
    What happens if the user selects December in the 1st
    box?

  • Passing FORM variables through CFSET

    I am writing an account creation page for my site. After the
    user inputs the required information, I would like to 1. confirm
    that their email is not a duplicate of another user 2. Pass them
    off to another page that allows them to confirm the information
    that they input and submit the info to the database. I would like
    to have the email confirmed on that page through passing the
    FORM.email variable to the #CGI.SCRIPT_NAME#. If the RecordCount on
    the query for duplicate email addresses comes back VALUE=0, use
    CFLOCATION to pass to the next page with the FORM variables intact.
    However, as forms can only have one action attribute, what is the
    best way to do this, in your opinion?
    Thanks so much for your help!
    dan

    use session var to store form data:
    - user submits form.
    - form posts to same page (to itself).
    - check for duplicate email
    - if no duplicate found, copy form to a sesion var and
    cflocate to next
    page; if duplicate found show error to user
    - on next page display user-submitted data from the session
    var
    make sure session vars are enabled in cf administrator and
    sessionmanagement is enabled in your appliction.cfm/cfc
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Lightwindow passing form variable to action page

    Hi,
    I have a form that is popup using lightwindow to allow users to fill out the form.  For some reason, I couldn't get the form.variables to pass to the action page and insert into a database.  Anyone has suggestions or ideas?
    thanks.

    link to open lightwindow pop up page.  of course i've all the js required on the top of the page
    <a href="form.cfm" params="lightwindow_width=500,lightwindow_height=600" class="lightwindow page-options">Form</a>
    here is the form
    <form id="form1" name="form1" method="post">
    <p><label for="fname">First Name</label><input type="text" name="fname" id="fname" class="inputText" /></p>
    <p><label for="lname">LastName</label><input type="text" name="lname" id="lname" class="inputText" /></p>
    <p><p><a href="hello.cfm" params="lightwindow_form=form1" class="lightwindow_action" rel="submitForm"><button>Submit</button></a> or <a href="#" class="lightwindow_action" style="color: blue;" rel="deactivate">Cancel</a>
    </p>
    here is the action page for the form (hello.cfm)
    <cfoutput>#form.fname# | #form.lname#</cfoutput>
    I do not know if this is out it's supposed to do it or not but the form variables are not passing over to the action page.
    thanks

  • Using HTML, what happens to form variables on submit?

    If I create a simple AIR app that  has two files, lets say index.html and next.html, how would I pass form  variables from one page to the next since there is no server side  scripting?
    Can  it be done via javascript somehow, by maybe saving the variables from  the first page and then retreiving them on the second?
    Here a  sample of what I am trying to accomplish:
    index.html
    <html>
    <body>
    <form method="GET"  action="next.html" name="theName">
      Name:
      <input type="text"  name="textField">
      <input type="submit" value="submit"  name="submitButton">
    </form>
    </body>
    </html>
    next.html
    <html>
    <body>
    <!-- How to display  textField variable from previous pages theForm field? -->
    </body>
    </html>

    Found solution here:
    http://forums.adobe.com/message/2649503#2649503

  • Passing Form Vars to a CFC

    I am trying to pass Form variables to a CFC. Yes, the CFC
    works being called from Flex, with no arguments, but being new to
    Flex I am not sure how to post the values in the form fields back
    to the CFC. So my questions are:
    1) how do you reference form variables. They are all enclosed
    in a form tag, and then by form item tags, I have a variety of
    types of inputs
    2) How do you pass that information to the cfc? Currently I
    am using this code: getSearch.getSearch.send({values:vals});
    In an attempt to pass an array full of values to the CFC.
    Any help would be great!
    Thanks,
    Rob

    I know exactly where you are coming from...LOL..
    I was there too. Here is what you can do to make it easy on
    you.
    You wrap them in an object.... It is as simple as that.
    say that you have multiple form items.
    if you are using a data typed object ( I recommend it) you
    would do something like this to pass form data to a cfc
    // This creates a data typed object called object.
    var obj:AS01Phone = new AS01Phone;
    //Populate the data typed object with your form data
    obj.UserID = Number(userid);
    obj.PhoneType = String(_phoneType.selectedItem.KeyValue);
    obj.DialCode = Number(_dialCode.selectedItem.DialCode);
    // Now send it to the cfc for processing
    // [RemoteObject.method(object);]
    roPhone.save(obj);

  • Form variables

    Hi
    i am trying to pass form variables from one page to another
    can anyone forward me to any to useful web sites (tutorials)?
    thanks

    you can use a query string to append illegal variables.

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • How to pass a form variable from page to page

    I have a series of 4 forms on 4 pages that update a database.
    A variable from one of the forms (doesn't matter which one, if it's
    easier one way over another, let's go that way) is passed to the
    last page, where a PayPal button will appear based on the value of
    the form variable. I am using ASP javascript and an Access
    database.
    Thanks.

    jennivazquez wrote:
    > I have a series of 4 forms on 4 pages that update a
    database. A variable from
    > one of the forms (doesn't matter which one, if it's
    easier one way over
    > another, let's go that way) is passed to the last page,
    where a PayPal button
    > will appear based on the value of the form variable. I
    am using ASP javascript
    > and an Access database.
    Either store the variable in a hidden field in the
    intermediate forms,
    or use a session variable.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to pass Applet form variables without showing it on top ?

    I am running one applet with some form variables. After submit I want to pass those to .asp file to store into database.
    If I use URL method then all are getting displayed on URL location of browser which I do not want. I want to pass many form variables to another .asp file, so it may not be good also.
    What is the best way of doing it ? Need urgent help about it.

    Well If you create a POST request instead as a GET request the variables will not show up in the URL.
    On tips how to do that you can either check out this thread:
    http://forums.java.sun.com/thread.jsp?forum=31&thread=56388
    or one of these:
    http://search.java.sun.com/Search/java?qt=applet+GET+POST+variables&col=javafrm&rf=0
    Sjur

  • How can I pass a variable between JSP and Role Form

    I need to pass a variable from (a copy of) applicationmodify.jsp to the IDM Role Form so that the variable is available within the Role Form at display. We've tried getAttribute and setAttribute modifying both the Role Form and the applicationmodify JSP and can get the form to the role form but not accessible but have had no other success. Has anyone had any success in doing this? Any suggestions would be appreciated.

    if by _root level you mean you're loading something into
    _level0 you can't won't be able to use the localconnection. the
    sharedobject is your only option.

  • Form Variables Don't Pass for Some Clients

    Recently, I’ve noticed some problems on one of my pages
    where form field variables aren’t passing to my action page.
    As far as I can tell, this is a new problem.
    This is the error I’m getting:
    Error resolving parameter FORM.EMAIL
    The specified form field cannot be found. This problem is
    very likely due to the fact that you have misspelled the form field
    name.
    The error is thrown when a cfquery is unable to find the form
    variable.
    The query looks, basically, like this:
    <cfquery name="Iogin" datasource="dsn">
    SELECT Count(*) AS Match
    FROM Users
    WHERE users.email = '#FORM.email#'
    AND users.password = '#FORM.password#';
    </cfquery>
    I know I could squash these errors with a cfparam or with
    other error checking, but what I’m really concerned about is
    why the form variables aren’t there. I have tested the form
    on a number of my internal clients and have not been able to
    replicate the error as it is being triggered from outside clients.
    I am able to submit a blank form or a complete form without any
    errors being thrown. I have established that the form submissions
    are coming from my site and are not being submitted by an outside
    domain.
    QUESTIONS:
    1. Does anyone know what might be happening to cause the form
    variable to disappear? Shouldn’t all the forms variables be
    submitted when a user hits the submit button, regardless of whether
    there is data in the form field?
    2. Could a firewall on the clients’ end be withholding
    the form variables without notifying the user?
    3. Have there been any recent changes to browsers that could
    be holding back form variables?
    Any help would be greatly appreciated!

    @Azadi
    quote:
    from your posts it looks like this happens to different forms
    in your application (you mentioned the email field and also a
    select box, which is presumably in some other form)
    I was able to resolve the problem with the second form (the
    one with the select box, not the one posted above). A JavaScript
    resided on that action page which triggers a service. The service
    (similar to GoogleAds) receives the page’s url from the
    JavaScript and then the service comes back and loads the page to
    evaluate the page’s content. The result: Action pages being
    loaded with no form content. My error reporting, very similar to
    what insuractive suggested, helped solve this problem.
    HOWEVER, we still periodically have trouble with the other
    form. I know from speaking with at least two users that the problem
    is a direct result of users following the planned application
    flow—form to action page. So this discussion is still
    relevant.
    @insuractive
    quote:
    you should make sure you test to see what happens when the
    client has javascript and/or cookies disabled on their browser.
    This is a good thought. I’m embarrassed to say that I
    haven’t tried accessing this form with cookies and JavaScript
    turned off. I will try this and report back.
    Thanks to all of you who are offering suggestions.

  • Want to pass Applet form variables without showing it on URL Location

    I am running one applet with some form variables. After submit I want to pass those to .asp file to store into database.
    If I use URL method then all are getting displayed on URL location of browser which I do not want. I want to pass many form variables to another .asp file, so it may not be good also.
    What is the best way of doing it ? Need urgent help about it.

    I tried following code using URL Connection Object, Code is running fine in IE and Appletviewer, but not running in Netscape.
    Following is the code:
    There is an applet with form. After Submit button, The form variables will be send to ASP script where I am storing it into database. In Netscape the server connection is made (blank record is getting created) but data is not passed.
    public void actionPerformed(ActionEvent event) {
    try{
    ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);
    PrintWriter out = new PrintWriter(byteStream, true);
    String postData = "firstName=manisha";
    out.print(postData);
    out.flush();
    URL dataURL = new URL("http://manisha/appletexamples/confirm-px.asp");
    URLConnection connection = dataURL.openConnection();
    connection.setUseCaches(false);
    connection.setDoOutput(true);
    String lengthString = String.valueOf(byteStream.size());
    connection.setRequestProperty ("Content-Length", lengthString);
    connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    byteStream.writeTo(connection.getOutputStream());
    BufferedReader in =
    new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String line;
    while((line = in.readLine()) != null) {
    System.out.println("line: " + line);
         } //while
         in.close();
    } //try
    catch(Exception e){}//catch
    }//action performed
    My ASP Code
    <%
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open("DATABASE=phptestdb;DSN=phptestdsn")
    %>
    <HTML>
    <HEAD>
    <TITLE> A Sample Program </TITLE>
    </HEAD>
    <BODY>
    <%DIM fname
    fname = ""
    fname = Request("firstName")
    response.write ("fname : " & fname)
    qrystr1 = "insert into applettesttable (fname) values ('" & fname & "')"
    conn.Execute qrystr1
    conn.Close
    Set conn = Nothing
    %>
    </BODY>
    </HTML>

  • How to pass bind variable into oracle reports 6i - Parameter form

    Hello All,
    I want to pass bind variable into Oracle Reports 6I - Parameters.
    I have tried out that but got the below error :-
    rep-0781 : Bind variables are not allowed in the select statement
    Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
    Thanks
    HARSH SHAH

    Hi,
    may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
    but u can full fill user requirement using oracle forms
    create a form as like as report parameter window
    then create parameter list and run report
    PROCEDURE Run_Emp_Report IS
      pl_id ParamList;
    BEGIN
      pl_id := Get_Parameter_List('tmpdata');
      IF NOT Id_Null(pl_id) THEN
        Destroy_Parameter_List( pl_id );
      END IF;
      pl_id := Create_Parameter_List('tmpdata');
      Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
      Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    thanks
    mostafiz mitul
    Dhaka Bangladesh

Maybe you are looking for

  • Need help troubleshooting issues with Adobe Reader X

    Hello, Recently our company upgraded multilpe computers to Reader X.  Initially we installed version 10.1.0.  Ever since our users on X have been experiencing problems.  We are seeing three different issues. 1) A user will fill out the PDF and click

  • Installed tv series and one show will not play

    I feel like I am getting the run around... I downloaded to my itunes and installed on my ipod the tv series Big Bang Theory season one. Out of the 17 shows one will not play. I have tried uninstalling it and reinstalling it several times with no suce

  • Manual Deployment (Very Urgent)

    Hi, What is manual Deployment, Why do we use Manual deployment. I guess manual deployment is done after automatic deployment. What are the prerequisites for performing manual deployment. How is it different from automatic Pull/ Push deployment?? Plea

  • Folders window: reverse the order?

    I name my folders starting with the shoot date in the YYMMDD format. I would like to see my folders listed in reverse order: most recent shoot first. Seems like a reasonable request; is it possible?

  • How to install TCS for just one userHere'sm

    Here's my situation: I have Windows 7 with two user accounts. On user account 1 (User1) I installed TCS 1.0. Everything went just fine. However, the installation is available to all users on the machine. Along comes TCS 2.0, which I want to install o