1

I'm trying to output an amform in a template that has been selected from a Form field. From the amform docs, it says:

{{ craft.amForms.displayForm('formHandle') }}

My matrix fieldname is called myFormField:

enter image description here

so:

{{ craft.amForms.displayForm('{{block.myFormField}}') }}

But it doesn't look like craft is parsing {{block.myFormField}}:

No form exists with the handle “{{block.myFormField}}”.

Any thoughts?

4

Solution:

{% if block.myFormField|length %}
    {{ block.myFormField.first().displayForm() }}
{% endif %}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.