日本語コミュニティーへようこそ!このチャンネルは現在ベータ版です。

詳細はこちらをご覧ください。

Passing parameters into custom modules

ユーザー

I am adding a Stripe button to HubSpot so my pages can do payments.

 

var stripe = Stripe('pk_live_XXXXXXXXXX', { betas: ['checkout_beta_3'] });

 

the pk_live cannot be hard-coded in the component; it needs to be an input parameter. Would it be something like this:

 

var stripe = Stripe('{{stripe_sku_id}}', { betas: ['checkout_beta_3'] });

 

How do I set this in a given instance of a form (ie a landing page)?

 

@tjoyce apparently you're a wizard of forms? スマイリー ハッピー  Any guidance most appreciated. HubSpot themselves don't seem to be able to explain this which I think is very odd.

返信
0 いいね!
1件の返信1
Highlighted
Top Advisor | Gold Partner

Hi @Julian-Harris - 

yes, you would create a field with text_field and then use the code you have with just 1 modification the module value - it would be {{module.stripe_sku_id}}.

You won't be able to use the value in the js section of the module so put it in the hubl section.