What the buyer sees
- The buyer clicks the upsell button.
- A form opens over the page: name, address, city, state, ZIP/postal code, country, and an optional phone.
- The buyer clicks Continue. ElasticFunnels checks the address and works out shipping for that country from the product’s shipping profile.
- A summary shows the item, shipping, tax and the total, plus the ship-to address. The button reads Confirm and pay $X.
- 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.


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:
Example: a gift block with a note and a decline link
Paste this on the upsell page. The button opens the gift form, the note rides along as thegift_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:
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.
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.
Gift lines on the thank-you page
On the thank-you page, read the order withgetSessionOrders(): 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:
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_toisfalsefor 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-addressorform=addressshows a short “not available” message and charges nothing, so an order never ships to the wrong address. Aform=fieldslink works as a plain upsell without the fields.