6 Replies Latest reply on Nov 4, 2013 6:28 PM by BenPleysier

    where to post an upload variable

    phpandcss

      I use a cart on my website and in order for it to process orders I need to post this variable on the form for the check out cart. does it go on the credit card processor form where user inputs the credit card info?

       

      <input type="checkbox" title="Manual" name="cmd" value="_cart">

      <input type="checkbox" title="Manual" name="upload" value="1">

      <input type="checkbox" title="Manual" name="business" value="Your PayPal Email Address">

      <input type="checkbox" title="Manual" name="item_name_1" value="Post Your Value Here">

      <input type="checkbox" title="Manual" name="amount_1" value="x.xx">

      <input type="submit" name="submit" value="submit">

      </form>

        • 1. Re: where to post an upload variable
          BenPleysier Adobe Community Professional & MVP

          The posted results should be processed in the action page as in

          <form action="mypage.php">

          This action page can be the same page as the form or it could be a different page. This depends on how the script has been coded.

           

          I find the markup, that you have posted, a bit strange though. There is no label for the user to identify the input field.

          1 person found this helpful
          • 2. Re: where to post an upload variable
            phpandcss Level 1

            What label is for the user to identify the input field? If you'll look at the screen shot, in between what two tags should I post the upload variable depicted in the first comment?
            Untitled.png

            • 3. Re: where to post an upload variable
              David_Powers Adobe Community Professional

              If you need to include a variable when the form is submitted, use a hidden field:

               

              <input type="hidden" name="some_variable" value="xyz123">

               

              Although it's called a "hidden" field, it's actually visible in the HTML source code, so it shouldn't be used for sensitive data.

              • 4. Re: where to post an upload variable
                BenPleysier Adobe Community Professional & MVP

                As David has suggested, you should use hidden fields as in

                <input type="hidden" name="cmd" value="_cart">

                <input type="hidden" name="upload" value="1">

                <input type="hidden" name="business" value="Your PayPal Email Address">

                <input type="hidden" name="item_name_1" value="Post Your Value Here">

                <input type="hidden" name="amount_1" value="x.xx">

                <input type="submit" name="submit" value="submit">

                Also, you should ensure that the red-coloured values have been entered.

                 

                As for the placement, because the fields are hidden - with the exception of the submit button - from view, it matters not, as long as they are inside the form. The submit button is usually placed at the end of the fieldset/form.

                • 5. Re: where to post an upload variable
                  phpandcss Level 1

                  1.  Mr. Ben, what is the value to be inserted in one of the red values? which value is it?

                  <input type="hidden" name="item_name_1" value="Post Your Value Here">

                   

                  2.  and most importantly, what does a label for the user to identify the input field look like?


                  3.  Can you post one which is specifically for this form upload variable?


                  • 6. Re: where to post an upload variable
                    BenPleysier Adobe Community Professional & MVP

                    1. Your form is meant to be processed by PayPal. PayPal requires information in a format that they understand, hence the fields that you have erroneously typed as 'checkbox'.

                     

                         If you have a product called 'Pull Up Widget' that has a price of 10 cents, then PayPal needs to know that. The two affected fields would look like

                    <input type="hidden" name="item_name_1" value="Pull Up Widget">

                    <input type="hidden" name="amount_1" value="0.10">

                    2. Copy and paste the following into a new document and view in 'Live' view or in your favourite browser.  Note that hidden fields do not require a label.  

                    <!doctype html>

                    <html>

                    <head>

                    <meta charset="utf-8">

                    <title>Untitled Document</title>

                    </head>

                     

                    <body>

                    <h3>No Label</h3>

                    <p>User has no idea what the checkbox is for</p>

                    <form>

                      <p>

                        <input type="checkbox" title="Manual" name="cmd" value="_cart">

                      </p>

                      <p>

                        <input type="checkbox" title="Manual" name="upload" value="1">

                      </p>

                      <p>

                        <input type="checkbox" title="Manual" name="business" value="Your PayPal Email Address">

                      </p>

                      <p>

                        <input type="checkbox" title="Manual" name="item_name_1" value="Post Your Value Here">

                      </p>

                      <p>

                        <input type="checkbox" title="Manual" name="amount_1" value="x.xx">

                      </p>

                      <p>

                        <input type="submit" name="submit" value="submit">

                      </p>

                    </form>

                    <hr>

                    <h3>With Label</h3>

                    <p>User is told what the checkbox is for</p>

                    <form>

                      <p>

                        <label>

                          <input type="checkbox" title="Manual" name="cmd" value="_cart">

                          input 1</label>

                      </p>

                      <p>

                        <label>

                          <input type="checkbox" title="Manual" name="upload" value="1">

                          input 2</label>

                      </p>

                      <p>

                        <label>

                          <input type="checkbox" title="Manual" name="business" value="Your PayPal Email Address">

                          input 3</label>

                      </p>

                      <p>

                        <label>

                          <input type="checkbox" title="Manual" name="item_name_1" value="Post Your Value Here">

                          input 4</label>

                      </p>

                      <p>

                        <label>

                          <input type="checkbox" title="Manual" name="amount_1" value="x.xx">

                          input 5</label>

                      </p>

                      <p>

                        <input type="submit" name="submit" value="submit">

                      </p>

                    </form>

                    </body>

                    </html>

                    3. Not sure what you mean.     

                     

                    Here for a free Dreamweaver PayPal-extension and some information that will help