Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 02:28:35 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155506 Posts in 21711 Topics by 7737 Members
Latest Member: simpleguy
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: form module heading problems  (Read 965 times)
hounddog32

Offline Offline

Posts: 7


« on: September 01, 2005, 06:39:59 PM »

I am using 2.5.2 with the default install, made a form with a heading which looked OK testing in firefox but failed in IE. turns out the problem was the slashes that are written in the database. Firefox let a heading spill into a neightboring cell, IE would not, the HTML said:
<tr><td class=\"field_heading\" colspan=\"2\"><h2>Three Things I have learned today<input type="hidden" name="field2" id="field2" value="===[Three Things I have learned today]===" /></h2></td></tr>
so it did not know how many collumns the heading should cover (aside: should have use <th>, I know...)

FIX:

in [wb]/modules/form/view.php find lines 160-164 by seargin for "heading"

Code:
} elseif($field['type'] == 'heading') {
$vars[] = '{FIELD}';
$values[] = '<input type="hidden" name="field'.$field_id.'" id="field'.$field_id.'" value="===['.$field['title'].']===" />';
$tmp_field_loop = $field_loop; // temporarily modify the field loop template
$field_loop = ($field['extra']);

change line 164 to read
Code:
$field_loop = stripslashes($field['extra']);

and all is fine and happy in the form.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!