WP1, on Jan 23 2008, 10:05 PM, said:
I also would like to change the layout of this form.
I
have not been able to contact the Developer of the script.
Also, I keep getting a problem page when I submit information.
Katherholt!
- Are you having any probem submitting information?
- What code are you using to call the form?
- How did you get rid of the borders around the boxes?
Thanks in advance for any and all responses to my call for help with this.
WP1
1. No problem submitting
2. [!InquiryForm!] (make sure your page is
not 'cacheable' on the publishing tab)
3. To get rid of the borders around the boxes, I removed the "fieldset" code and used a <p>tag instead (see red bold items below):
// ========================================================
if (!function_exists('DisplayField')) {
function DisplayField ($field)
{
// Function to display a field description and input box
$output = '
<p align="left">' . "\n";
// Form field label
$output .= ' <label for="' . $field['name'] . '"';
// Handle required field
if ($field['required'] == 1) {
$output .= ' class="error">*';
} else {
$output .= '>';
}
$output .= $field['descr'] . ":</label>\n";
// Form field input
$output .= ' <input name="' . $field['name'] . '" id="' . $field['name'] . "\"\n";
$output .= ' type="text" maxlength="256" size="' . $field['size'] . '"';
// Initial value of the field
if (isset($_POST[$field['name']])) {
$output .= "\n value=\"" . $_POST[$field['name']] . "\"";
}
$output .= " />\n";
// Handle field explanation
if ($field['explain'] != "") {
$output .= ' <div class="explain"><small>' . $field['explain'];
$output .= "</small></div>\n";
}
// Close this field
$output .= '
</p>' . "\n";
return $output;
}
I modified the code quite a bit, because I didn't need all of it. I've attached a text file for you to view. I could use some help modifying it for layout and perhaps adding some more fields.
Karen