So for those who are now playing with my new Easy Prepop software in its last stages of beta, here is something for the more adventurous among you.
WordPress now has what are known as “shortcodes”, and they are wicked powerful things if you know what you can do with them. The most basic one for EP is:
This will simply display a field and a “continue” button, on your landing page, that will then submit to the list of URLs you set up for that specific page.
But it doesn’t stop there… I’ve built in support for a whole slew of parameters so you can get crazy with your prepop forms. Like I said, this is advanced stuff. If you’re already reasonably handy with HTML or CSS then this should be a breeze to understand. Here’s the complete list of supported shortcodes and any default settings, as of 5.14.11:
‘form_class’ => ‘ep-oj-form’, // default overall form class
‘form_style’ => ”, // default overall form style
‘form_name’ => ‘ep-oj-form’, // form name parameter
‘form_id’ => ‘ep_oj_lander_form’, // form id parameter
‘action_url’ => ”, // form action parameter
‘method’ => ‘GET’, // form method parameter
‘onsubmit’ => ”, // form onsubmit parameter
‘but_class’ => ”, // default button class
‘but_text’ => ‘Continue →’, // default button text
‘but_style’ => ”, // arbitrary inline button css
‘but_name’ => ”, // button name parameter
‘but_id’ => ”, // button id parameter
‘field_class’ => ”, // default field class
‘field_text’ => ”, // default field text
‘field_style’ => ”, // arbitrary inline field css
‘field_name’ => ‘email’, // field name parameter
‘field_id’ => ‘boo’, // field id parameter
‘onblur’ => ”, // adding an onblur to the field
‘onfocus’ => ”, // adding an onfocus to the field
‘img_src’ => ”, // default custom button image source
‘img_name’ => ‘image’, // default button image name, if img_src is defined.
‘img_width’ => ’120′, // default button image width, if img_src is defined.
‘img_height’ => ’60′, // default button image height, if img_src is defined.
‘camp’ => ”, // specify the campaign to use, in case of wanting to use the shortcode in a post rather
So to use them, you just add them like you would html, like this:
[ep_form form_class="class_name" action_url="http://url-to-submit-to.com" onsubmit="resizeTo(800,600);" but_text="Click Me!"]
and so on and so forth. You can use any or all of these parameters in any combination. The only exception is that you can’t use img_width, img_height, or img_name unless you have also specified an img_src, since it makes no sense to have any of those without having specified the button image itself.
This opens EP up to a lot of things, including using it to submit to completely different pages that have nothing to do with prepop URLs! You could simply set it up to post to your autoresponder, for example. Or to another product page of your own, or… basically anything you can think of.
The one limitation I’m not happy about currently, is that you can’t add additional inputs (fields) because the [ep_form] shortcode opens and closes the form completely. Any inputs you add after it, will fall outside the form and won’t function. I’m working on a solution for this, don’t know if it will make 1.0 but if not, it will come later. It would allow you to put any HTML you wanted inside the shortcode itself, allowing for complete support of any inputs or other form elements you want to add.
I would love for some intrepid folks to play with these features and let me know how it goes. I’m already finding them mighty useful and I hope you do too!