Small mod I added to this plugin

Permalink Browser Info Environment
As a front end developer/designer, sometimes I have forms that are not always exactly the same. Sometimes I have long forms where its two questions on one line, then three, then two again. Specifically in situations where you want to condense City, State, & Zip into three fields next to eachother. Its nothing super special, but I added a counter that adds a unique wrapper class to each question. You will notice in the <div class"field field-<?php echo $question['type']; ?>> I simply added:
<?php echo 'qwrap-'.$counter++; ?>">

I have included the modified view file.

This is probably already been done. But for those of you who are decent with CSS but not so good at PHP this may be helpful.
Just unzip and replace with the file in /packages/form_tableless_layout/blocks/form/templates, or create your own block template and put it in the root blocks folder with the same folder structure and name it something else. I didn't zip up the whole plugin, because this was the only file modified.

1 Attachment

Type: Discussion
Status: New
SteamSynthetic
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Hi,
Thanks for posting this. This is a good solution for certain situations, but be cautious of the drawback to it: you are tying your layout to the exact order of the fields in the form, so if the user edits the form block and inserts a new field or rearranges the order of them, your layout will break.

Because of this drawback, I've actually created a custom contact form addon where you just hardcode all of your fields yourself and can have complete control over the form markup:
https://github.com/jordanlev/c5_custom_contact_form...

Depending on your situation, this might also be a good solution.

-Jordan
SteamSynthetic replied on at Permalink Reply
SteamSynthetic
I will definitely test this out. Thanks for the feedback.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.