CMS Development

ben-duchy
トップ投稿者

Simplifying form usage

解決

Is it possible within a custom web module to show / hide info if a certain field within a form matches the contents of a custom field within the web module?

 

Currently when I select a form within the web module it displays set info (example below). How do I write an if condition based on the first name field which isn't shown in the code?

 

{% form
	form_to_use="{{ module.form_field.form_id }}"
	response_response_type="{{ module.form_field.response_type }}"
	response_message="{{ module.form_field.message }}"
	response_redirect_id="{{ module.form_field.redirect_id }}"
	response_redirect_url="{{module.form_field.redirect_url}}"
	gotowebinar_webinar_key="{{ module.form_field.gotowebinar_webinar_key }}"
%}

 

0 いいね!
1件の承認済みベストアンサー
BarryGrennan
解決策
トップ投稿者

Simplifying form usage

解決

Hi Ben, 

 

Depending on your account level you can natively use dependent form fields

Failing that you'd likely need to use a javascript solution targeting the specific input by name and triggering something to show on change/keyup, etc.

元の投稿で解決策を見る

3件の返信
ben-duchy
トップ投稿者

Simplifying form usage

解決

Hi @BarryGrennan,

 

You're right, JS / bespoke API will probably be required for my use case as I would like to go beyond my original example and potentially change the email it sends the answers to based on a custom object field. I'll take a look, but I think the dependent form field will be too basic for my needs.

0 いいね!
BarryGrennan
トップ投稿者

Simplifying form usage

解決

For the different emails part you could probably use workflows with the trigger being Form Submission and filter by contact property (again, depends on account level)

0 いいね!
BarryGrennan
解決策
トップ投稿者

Simplifying form usage

解決

Hi Ben, 

 

Depending on your account level you can natively use dependent form fields

Failing that you'd likely need to use a javascript solution targeting the specific input by name and triggering something to show on change/keyup, etc.