What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    Can we pass a variable to a product description for PayPal widget ?

    Asked by CscProvidence on April 25, 2016 at 04:04 PM

    The form currently being worked on allows a user to key in (free form) the code of a long and variable list of courses.  It would not be practical to have a drop down list of all possible course codes.

    I was hoping to use the field name (ex: {courseCode}) within a single product description of the Paypal widget, just to make it specific.  Instead of having "payment for a course" it would be "payment for course {courseCode}".  I've tried, but the field name is not being replaced during the form capture NOR at the PayPal payment page.

    Fingers crossed ...

  • Profile Image

    Answered by Ben on April 25, 2016 at 05:28 PM

    Unfortunately it would not be possible to do the same.

    The reason is that the payment processor will not read the pipes - field tags. This is possible to be done by only few fields and wizards (conditions, emails, integrations, etc).

    The only way to pass product description would be to add the products with the desired name within the payment processor itself.

  • Profile Image

    Answered by CscProvidence on April 26, 2016 at 12:31 PM

    Rats ... it would of been so "cool", as the kids would say.

    I wonder, wouldn't you have a way to (re)write the widget so it could process the field names before it gets to the payment processor ?  It would be like overwriting the product description on the fly.  It then could display as updated on the form (like a condition can hide/show parts of a form) and head off to the payment processor in its 'final' form (ie field names replaced by the respective values).  It sounds like some programing could do the trick, no ?

    You already do something very similar with the "custom" amount by taking the value of a field ...  It could be as 'simple' as doing the same thing with the product description field. Maybe just extend the 'custom' option to grab the description from a calculated field as well ?  The feature is not needed for multiple products situations, at least not in my instances to date.

    For now, given way too many courses are possible and one is chosen earlier in the form, I would not want to ask the question again as a product ...  Not to mention this could create a mismatch between the two selections.

    What if the course is selected from a drop down list, could I then display only one of many matching "payment" element, hiding all others ? There would be only one 'submit' button.  It would be a lot of work as opposed to just using the field name as a variable in an otherwise generic product desc.  It would, however, allow for different prices (not needed in my current situations).  But I believe we're limited to one payment method per form.  So things get worse by having to pass values to an other form, one per course ... yikes.  Possible but a nightmare to manage.

    Where there's a will, there's a way ... Sometimes it just isn't worth the trouble. ;(

  • Profile Image
    JotForm Support

    Answered by david on April 26, 2016 at 01:40 PM

    If you would like to pass a custom field to Paypal, you can do that but only using plain form fields found under the Form Tools section.

    1. Choose a field under "Form Tools", in my case I'll use a plain text field. Click the Properties of your payment method.

    2. Inside the Properties of Paypal you can set the custom field to the plain field that you setup, in my case I used a plain Text field named "Custom Field".

  • Profile Image

    Answered by CscProvidence on April 27, 2016 at 05:55 PM

    That might just do the trick, I just need the one field (for now) ... uncertain how I will see the field on the PayPal end.

    I will probably need to do a hidden plain field which gets the value from a drop down list, if I can get away with that ... through a condition maybe since calculated fields are not 'plain' ?  Worth a try ...

  • Profile Image
    JotForm Support

    Answered by david on April 27, 2016 at 07:24 PM

    The update a form field value condition should do it:


    The field will show up in the invoice details as Custom.  Here is an example:

  • Profile Image

    Answered by CscProvidence on April 28, 2016 at 12:46 PM

    Excellent !!


    I believe the 'custom' field also shows up in one of the detailed transaction reports (CSV, Excel) out of PayPal, which is the part needed for our Finance department to spread the love ... err ... funds in appropriate budgets.


    I need to group these aspects in a book as I will never remember all of them ... until I get to do this full time like you guys/gals.

  • Profile Image
    JotForm Support

    Answered by david on April 28, 2016 at 12:51 PM

    There are very few things we run in to that there isn't some sort of workaround for.  It amazes me the things people come up with.  If there is anything else we can help with, just let us know.