am-impact / amforms

Forms plugin for Craft
Other
121 stars 21 forks source link

get handle of form via field type Form #147

Closed rolfkokkeler closed 7 years ago

rolfkokkeler commented 7 years ago

I created a Form field selector ( field type Form ) for an entry. How do I get the handle from this entries selected form?

entry.ContactAppointmentForm.handle or getHandle() does not seem to do the trick

screen shot 2017-05-29 at 15 05 16

hubertprein commented 7 years ago

Automatically:

{{ entry.ContactAppointmentForm.first().displayForm() }}

Your own way:

{% set myForm = entry.ContactAppointmentForm.first() %}

{{ myForm.handle }}
{{ myForm.displayField('fieldHandleHere') }}
etc..
rolfkokkeler commented 7 years ago

Hubert,

thanx for the answer, I missed your comment six days ago

hubertprein commented 7 years ago

No problem, glad I could help :)