Firstly, though somewhat harder to navigate through than some other themes, let me just say I'm very impressed with the excellent theme.
I'd like to ask about adding extra fields (phone) to the contact form widget. I've seen the other posts about using the contact7plugin, however I'd like to avoid using plug-ins where possible. I've already subtracted the website field easily enough from comments.php, and have narrowed down the two contact forms where changes need to be made.
Widgets.php
<p><input type="text" name="phoneNumberWidget" id="phoneNumberWidget" value="<?php if(isset($_POST['phoneNumberWidget'])) echo $_POST['phoneNumberWidget'];?>" class="requiredField textfield<?php if($phoneError != '') {echo ' inputError';} ?>" size="36" tabindex="5" /><label class="textfield_label" for="phoneNumberWidget">Phone No. *</label></p>
Having inputted this into the widgets.php form, I was expecting a new field to pop up but it hasn't. (FYI, name is tabindex 4, phone is 5, email is 6 and comments 7)
Regardless, in order to validate the form I also added this code too....
submit-widget.php
//Check to make sure sure that a valid phone number is submitted
if(trim($_POST['phoneNumberWidget']) === '') {
$phoneError = 'You forgot to enter your Phone Number.';
$hasError = true;
} else if (!eregi("^[0-9_-]{14}$", trim($_POST['phoneNumberWidget']))) {
$phoneError = 'You entered an invalid phone number.';
$hasError = true;
} else {
$phone = trim($_POST['phoneNumberWidget']);
}
I am missing something here..?













