Custom Form
Permalink<start Form>
Formfield
Image
Formfield
iframe
Submit Buttom
<End Form>
The standard form block does not allow for this. Any ideas on hard coding, custom template, or external form capabilities (still have no idea what the external form block does)
I purchased a few blocks that can get the job done, but they are extremely buggy and I an constantly having to remake forms and fix problems. I more durable solution is need.
Thanks,
Jim
I like the jQuery Idea. Any incite on where I can find some sample code on how something like that would work?
I'm not the best with JQuery.
Thanks!
For the items you want to move into the form, you can use block design to name their blocks.
You will also want to make sure nothing happens in edit mode.
In its most basic form, something like:
$(document).ready(function(){ if (CCM_EDIT_MODE){ return; } $('#form_element_id').after($('#my_named_imageBlock_id')); $('#form_other_element_id').after($('#my_named_iframeBloick_id')); });
Or you could do it the other way round using .insertAfter().
I recommend using the form tableless layout template, which places each form element in a div, so you may want to climb up the tree.
$(document).ready(function(){ if (CCM_EDIT_MODE){ return; } $('#form_element_id').parent('div').after($('#my_named_imageBlock_id')); $('#form_other_element_id').parent('div').after($('#my_named_iframeBloick_id')); });
You could put the above in script tags in an html block. Or you could use my jQuickie block which will do the edit mode stuff and wrap the ready handler for you as well as running jsHint to catch syntax errors.
EDIT:
Yes, if the blocks you are filling in with were hidden, yes, you may also need to .show() them.
http://www.c5magic.co.uk/add-ons/magic-data-forms/enhanced-form-blo...
Enhanced form templates pull in other blocks according to a block naming convention, for example, use block design to name a block 'embellish_after_question5' and that block will be moved to immediately after question 5 in the form.
Another approach would be to generate your form using the standard form block without the extra images, iframe etc.
Then follow it with image and iframe blocks that are hidden (using block design).
Then have a block with a small snippet of jQuery to move the content of the hidden image and iframe etc blocks into the spaces you need them in the form.
You will probably find such hack easier with the tableless layout template for the form.