Possible to strip table structure from form?
Andy Watt created the topic: Possible to strip table structure from form?
Hello,
I am building a form in WORDPRESS with your Formmaker plugin. I decided to use it rather than hardcode a HTML form because your interface was so impressive...
But, the table structure of your form on the front end is terrible. I need a form without all of the table markup. Instead of all this:
<table>
<tbody>
<tr id="18" type="type_text">
<td id="18_label_section" class="entry-firstname" align="left" valign="middle">
<span id="18_element_label" class="label">First Name:</span>
<span id="18_required_element" class="required"></span>
</td>
<td id="18_element_section" class="entry-firstname" align="left" valign="middle">
<input type="hidden" value="type_text" name="18_type">
<input id="18_required" type="hidden" value="no" name="18_required">
<input id="18_element" class="input_deactive" type="text" style="width: 200px;" name="18_element" value="" title="" onfocus="delete_value("18_element")" onblur="return_value("18_element")" onchange="change_value("18_element")">
</td>
</tr>
...
I need something much simpler, like this:
<div id="18_label_section" class="entry-firstname">
<span id="18_element_label" class="label">First Name:</span>
<span id="18_required_element" class="required"></span>
</div>
<div id="18_element_section" class="entry-firstname">
<input type="hidden" value="type_text" name="18_type">
<input id="18_required" type="hidden" value="no" name="18_required">
<input id="18_element" class="input_deactive" type="text" style="width: 200px;" name="18_element" value="" title="" onfocus="delete_value("18_element")" onblur="return_value("18_element")" onchange="change_value("18_element")">
</div>
If I can remove all of the extra table structure, I can style the form any way I want with CSS. Multiple fields on a single line, etc...
Where is the code in your plugin that renders the form output? I can change this myself, but I am having a hard time finding where the HTML markup is rendered. I need this fixed in the next 24 hours, so a quick response would be greatly appreciated.
Thanks,
Andy
Please Log in or Create an account to join the conversation.
11 years 4 months ago
Andy Watt replied the topic: Re: Possible to strip table structure from form?
actually, it might be more like:
<div class="entry-firstname">
<div id="18_label_section">
<span id="18_element_label" class="label">First Name:</span>
<span id="18_required_element" class="required"></span>
</div>
<div id="18_element_section">
<input type="hidden" value="type_text" name="18_type">
<input id="18_required" type="hidden" value="no" name="18_required">
<input id="18_element" class="input_deactive" type="text" style="width: 200px;" name="18_element" value="" title="" onfocus="delete_value("18_element")" onblur="return_value("18_element")" onchange="change_value("18_element")">
</div>
</div>
Please Log in or Create an account to join the conversation.
11 years 4 months ago
Administrator replied the topic: Re: Possible to strip table structure from form?
Dear Andy
The HTML code is generated by JavaScript written in administrator/components/com_formmaker/js/formmaker.js.
Best regards
Web-Dorado team
Please Log in or Create an account to join the conversation.
-
- Administrator
- Offline
- Administrator
-
- Posts: 800
- Thank you received: 62
11 years 4 months ago
Katy replied the topic: Re: Possible to strip table structure from form?
I have to agree with Andy, the generated HTML is ugly nested tables, hard-coded <br> tags, and full of invalid HTML and legacy HTML4 style attributes.
While I think the admin UI of this plugin is really, REALLY nice, especially for the non-techie user, the generated code makes me cringe. You really should consider improving this and not make those of us concerned with well-structured, semantic code hack up your base code to correct it.
Please Log in or Create an account to join the conversation.
11 years 2 months ago
Administrator replied the topic: Re: Possible to strip table structure from form?
Dear Katy,
Thank you for your insightful comments and helpful suggestion. We will consider changing the HTML in the next version of
WordPress Form
Maker.
Best regards
Web-Dorado team
Please Log in or Create an account to join the conversation.
-
- Administrator
- Offline
- Administrator
-
- Posts: 800
- Thank you received: 62
11 years 2 months ago