Thank you for any advice that you can offer me with this problem. Moving the site to a CF7 server at this time is not an option for me. Regards, Paul Chisholm Cornwall, Ontario, Canada [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Chizzy66 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Laksma [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Passing Dynamic Variable In A Hidden Form - Macromedia ColdFusion

Passing Dynamic Variable In A Hidden Form - Macromedia ColdFusion

Hello: I am trying to pass a hidden variable from a form on my web application to the PayPal site for payment processing. I can get my code to work on my development machine (CF MX 7); however, I am getting the following error message when I try to run it on the hosting server (CF MX 6). I have tried to use an html form with <input> tags instead of the <cfinput> tags; however, I run into a problem when I try to pass a string that has been dynamically generated (#custom#) in the code example below. Instead of ...

  1. #1

    Default Passing Dynamic Variable In A Hidden Form

    Hello:

    I am trying to pass a hidden variable from a form on my web application to the
    PayPal site for payment processing. I can get my code to work on my development
    machine (CF MX 7); however, I am getting the following error message when I try
    to run it on the hosting server (CF MX 6).

    I have tried to use an html form with <input> tags instead of the <cfinput>
    tags; however, I run into a problem when I try to pass a string that has been
    dynamically generated (#custom#) in the code example below. Instead of passing
    my string, it is literally passing the value of #custom# as the variable.

    Here is the code below with non problematic parts removed in the interest of
    space:

    <!--- Generate A Custom Variable To PASS To PayPal --->
    <cfset custom = #CreateUUID()#>

    <!--- Create the hidden form to pass PayPal button information --->
    <cfform action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <cfinput type="hidden" name="cmd" value="_xclick">
    <cfinput type="hidden" name="business" value="businessnamemycompany.com">
    <cfinput type="hidden" name="item_name" value="Thing For Sale">
    <cfinput type="hidden" name="item_number" value="1">
    <cfinput type="hidden" name="amount" value="10.00">
    <cfinput type="hidden" name="no_shipping" value="2">
    <cfinput type="hidden" name="no_note" value="1">
    <cfinput type="hidden" name="currency_code" value="CAD">
    <cfinput type="hidden" name="lc" value="CA">
    <cfinput type="hidden" name="custom" value="#custom#">
    <cfinput type="image"
    src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0"
    name="submit_single" alt="Click here to process your credit card payment via a
    secure web site.">
    <cfinput type="submit" name="Submit" value="Process My Credit Card Payment">
    </cfform>

    Thank you for any advice that you can offer me with this problem. Moving the
    site to a CF7 server at this time is not an option for me.


    Regards,

    Paul Chisholm
    Cornwall, Ontario, Canada

    Chizzy66 Guest

  2. #2

    Default Re: Passing Dynamic Variable In A Hidden Form

    Hi Paul,

    In CF6, CFINPUT only support the following types:
    RADIO,CHECKBOX,PASSWORD,TEXT. Use HTML INPUT tag. You may leave the CFFORM.

    Laksma


    <!--- Generate A Custom Variable To PASS To PayPal --->
    <cfset custom = #CreateUUID()#>

    <!--- Create the hidden form to pass PayPal button information --->
    <cfform action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="businessnamemycompany.com">
    <input type="hidden" name="item_name" value="Thing For Sale">
    <input type="hidden" name="item_number" value="1">
    <input type="hidden" name="amount" value="10.00">
    <input type="hidden" name="no_shipping" value="2">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="currency_code" value="CAD">
    <input type="hidden" name="lc" value="CA">
    <input type="hidden" name="custom" value="#custom#">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif"
    border="0" name="submit_single" alt="Click here to process your credit card
    payment via a secure web site.">
    <input type="submit" name="Submit" value="Process My Credit Card Payment">
    </cfform>

    Laksma Guest

  3. #3

    Default Re: Passing Dynamic Variable In A Hidden Form

    Hello Laksma:

    Thank you for the fast response. I have tried using the HTML <input> tag as
    follows:

    <input type="hidden" name="custom" value="#custom#">

    <cfinput type="hidden" name="custom" value="<cfoutput>#custom#</cfoutput>">

    However, both of those statements pass the string as #custom# instead of the
    string that I assigned to the variable called custom using the following
    statement:

    <cfset custom = #CreateUUID()#>

    The statement above creates a string in the form of:
    976B81AD-B0D0-6834-297A02473995683F
    That I need to pass to PayPal. Thanks again for any advice or assistance that
    you can provide.


    Paul


    Chizzy66 Guest

  4. #4

    Default Re: Passing Dynamic Variable In A Hidden Form

    Try
    <cfoutput>
    <input type="hidden" name="custom" value="#custom#">
    </cfoutput>

    Ken
    The ScareCrow Guest

  5. #5

    Default Re: Passing Dynamic Variable In A Hidden Form

    I tried the code using CFMX6.1 and it works fine. Also try what Ken suggested. Put CFOUTPUT.

    Laksma
    Laksma Guest

  6. #6

    Default Re: Passing Dynamic Variable In A Hidden Form

    Hello Ken:

    Thank you very much, your suggestion worked perfectly! Have a wonderful day.

    Paul
    Chizzy66 Guest

  7. #7

    Default Re: Passing Dynamic Variable In A Hidden Form

    Thanks to all. I encountered this problem and found this solution through google.
    alvin Guest

Similar Threads

  1. Question how to set hidden variable value on paent CF flash form from a popup form
    By Unregistered in forum Brainstorming Area
    Replies: 0
    Last Post: April 2nd, 01:21 PM
  2. Problem passing hidden fields using Flash form
    By lusciousmango in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: April 20th, 02:45 PM
  3. form variable passing
    By realtime158 in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: January 9th, 02:26 PM
  4. Passing A Form Variable
    By drdagwood in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: July 14th, 08:45 PM
  5. Passing form variable
    By Nifkins Bridge in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 17th, 09:15 AM

Bookmarks

Posting Permissions

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