Adding a form ID with a variable
-
Hi,
I’m a little lacking in my PHP and the suggested snippet for adding forms to templates is unfamiliar to me.
How do I do something like this:
$form_widget = new \MailPoet\Form\Widget(); echo $form_widget->widget(array('form' => $emailid, 'form_type' => 'php'))
$emailid is where there would normally be a number. I’m drawing the variable from a custom field. The variable prints “3” in my HTML when I test it. Is this a problem of how the string is formatted or how I’m inserting it into your snippet? Is there an alternative way I can build the form?
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding a form ID with a variable’ is closed to new replies.