Skip to main content
An upsell form collects a few details before a one-click upsell is charged. The most common use is a gift: the buyer adds a second pack and sends it to a friend, so the upsell needs the friend’s address. The form can also collect your own fields (an engraving line, a gift note, a size). The buyer’s card is not asked for again. The form only collects the details, shows the price with shipping for that address, and charges the card from the first order when the buyer confirms.

What the buyer sees

  1. The buyer clicks the upsell button.
  2. A form opens over the page: name, address, city, state, ZIP/postal code, country, and an optional phone.
  3. The buyer clicks Continue. ElasticFunnels checks the address and works out shipping for that country from the product’s shipping profile.
  4. A summary shows the item, shipping, tax and the total, plus the ship-to address. The button reads Confirm and pay $X.
  5. On confirm, the card on file is charged once and the funnel moves to the next step, the same as a normal one-click upsell.
The upsell form's address step: recipient name, address, city, state, ZIP, country, optional phone and Continue The upsell form summary: item, shipping and total, the recipient's ship-to address and Confirm and pay If a field is missing or invalid, the form shows the error next to that field and nothing is charged. If the product does not ship to the chosen country, the country field says so and nothing is charged.

Option 1: no code, add form= to the upsell tag

Add a form option to an upsell or downsell link tag:
Any input on the page with a data-ef-upsell-field attribute is sent along as a custom field:
Paste this on the upsell page. The button opens the gift form, the note rides along as the gift_note field, and the decline link moves the buyer to the next step without charging.

Change the form’s text, colors and fields

The built-in form takes a few more options on the same tag. [UPSELL=], [DOWNSELL=] and [QUICKBUY=] all accept them:
Inside an href="...", wrap each value in single quotes, as above. A value with no spaces needs no quotes. message adds a Gift message box (up to 300 characters). The message shows on the summary and is saved on the order as the gift_message flag. Text from these options is shown as plain text, so HTML in it is displayed as typed and never runs. A color that is not a valid color is ignored and the default is used. Fields that are always there. Recipient first and last name, address, city and country are always asked for, plus the ZIP or postal code (except in countries that have none, such as Hong Kong or the UAE) and the state for the US, Canada and Australia. fields= can’t remove them: naming one of them, or a name that isn’t a field, is ignored with a warning in the browser console and the form still opens. What is checked. The form checks each field before Continue, and ElasticFunnels checks the same rules again on the server before any charge, so a page script that skips the form can’t place an order with a missing or invalid field. A refused field gets its own error under it:
  • every required field must be filled in;
  • the phone, when given, may only hold digits, spaces and + ( ) - ., with at least 6 digits;
  • names and address lines up to 100 characters, the city up to 50, the gift message up to 300.
To restyle the form from your page’s CSS instead, set these variables (a color option on the tag takes priority):

Option 2: your own form, call ef.quickBuy

If the page already has its own gift form, pass what it collected to ef.quickBuy. ElasticFunnels validates it, shows the summary with shipping, and charges on confirm.
ef.quickBuy does not leave the page on its own: send the buyer to result.nextUrl when you are ready. Pass redirect: true to have it go there for you. The address keys also accept the names most page forms already use: address1, region or province, postal_code or postcode, firstName, lastName. country is the two-letter code (US, CA, GB). State is required for the US, Canada and Australia.

Options

To get the price with shipping without charging (for example to show it in your own layout), call ef.quickBuy.quote(code, { ship_to }).

Example: your own form, with the error shown and the redirect

cancelled means the buyer closed the summary; nothing was charged and there is nothing to show.

Show the gift offer only when it can ship

A gift or ship-to upsell needs a main sale that can pay for a parcel to another address. ElasticFunnels already hides a [UPSELL=CODE form=gift-address] or form=address link (the whole link element) when it can’t, and refuses the charge if a page asks anyway. To swap in a different offer for those buyers, wrap the gift block in a template check:
upsell_form.can_ship_to is decided on the server, so the buyer never sees an offer that would fail. In a backend script, the same answer is canUpsellShipTo(). If your own form is built in JavaScript, ask the browser instead. ef.quickBuy.canShipTo() resolves to true or false:

Example: a page whose gift form calls handleLovedOneGift

Some landing pages ship with their own “send one to a loved one” form that calls a function named handleLovedOneGift with the package the buyer picked and the address they typed. Map each package to its product code and hand the rest to ef.quickBuy:

Several products with one form

A form works with a multi-product upsell too: [UPSELL=prod1,prod3 form=gift-address] asks for the address once and ships every selected product there. If your page uses window.ef.upsell to change the selection, the form charges what is selected when the buyer clicks. Each product’s shipping profile must ship to the recipient’s country, otherwise the form says so before anything is charged.

Shipping and tax

  • Shipping is charged from the product’s shipping profile for the ship-to country (and state, where the profile has state rates), not the buyer’s address.
  • A product whose profile has no rate for that country cannot be sent there: the form says so before anything is charged.
  • A product with no shipping profile, or a profile with no rates, ships free.
  • Tax is worked out for the ship-to address the same way as on checkout.

What is saved on the order

  • The upsell order’s shipping name and address are the recipient’s. The customer and billing details stay the buyer’s, so receipts and tracking emails go to the buyer.
  • The recipient’s phone, the gift mark and your custom fields are saved as order flags.
  • Fulfillment providers get the recipient’s name, address and phone on the label.
Open the order in Reports → Conversions to see them: its drawer has an Upsell form section with the ship-to, the gift mark, each custom field and a Main order link to the order the buyer placed first.

Gift lines on the thank-you page

On the thank-you page, read the order with getSessionOrders(): it holds the main product and every upsell from this checkout. Each product line (also in getOrders()) says whether it is a gift and where it ships:
The gift lines show on the first load of the thank-you page, right after the charge. country is the two-letter code (CA, GB).

Limits

  • Works with NMI, Stripe and the Test merchant (the gateways that charge a stored card for one-click upsells). With other merchants the form shows an error and nothing is charged.
  • Card buyers on NMI and Stripe can send gifts. Apple Pay buyers on NMI can too: the first sale saves the card, and upsells charge that saved card.
  • If the bank declines that saved Apple Pay card, a plain upsell falls back to the Apple Pay sheet. The sheet can’t carry the recipient’s address yet, so a gift or ship-to form says the payment was declined and charges nothing. This is rare.
  • PayPal buyers can’t send a gift: upsell_form.can_ship_to is false for them and the gift link is hidden. Wrap the offer in @if(upsell_form.can_ship_to) (above) to show them something else.
  • Needs an active purchase session, like every one-click upsell. If the session has ended the form says so.
  • If the buyer already bought that upsell in this session, the form says so and does not charge again. Clicking Confirm twice also charges once.
  • The form needs JavaScript. Without it, a link with form=gift-address or form=address shows a short “not available” message and charges nothing, so an order never ships to the wrong address. A form=fields link works as a plain upsell without the fields.