Well, figured it out myself: here are the directions for anyone who needs it:
start with form.php: add in text fields or areas by copying the code already in the form and changing it to reflect the new names etc for the field. To add radio buttons, use the following:
-
<label id="typeplan" for="typeplan" class="opt-label"<?php echo $typeplan_errlbl; ?>><?php echo $typeplan_label; ?>
-
<label id="typeplan1" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan1_label; ?>" /><?php echo $typeplan1_label; ?></label>
-
<label id="typeplan2" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan2_label; ?>" /><?php echo $typeplan2_label; ?></label>
-
<label id="typeplan3" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan3_label; ?>" /><?php echo $typeplan3_label; ?></label>
-
<label id="typeplan4" for="typeplan" class="opt-label"><input type="radio" name="typeplan" value="<?php echo $typeplan4_label; ?>" /><?php echo $typeplan4_label; ?></label>
-
</label>
-
just change "typeplan" to whatever you want to call your item. The way I've done it you use the same verbiage from the language file for the label of each button and their values, because it's a little less to do in the language file, but I assume you can make them different if you want.
Go to your language file, for example en-us. Add the additional language as needed in the following format:
[84] PLAN TYPE LABEL TEXT * Plan Type: [85] PLAN TYPE 1 LABEL TEXT * 403 (b)
[86] PLAN TYPE 2 LABEL TEXT * 401 (k)[87] PLAN TYPE 3 LABEL TEXT * Profit Sharing
[88] PLAN TYPE 4 LABEL TEXT * Deferred Compensation
When I open it in Notepad I have boxes directly behind each number bracket, but they disappeared when I copied it to here; I am so new at this I have no idea if that makes a difference. In general follow the format already in the file. Make sure you don't have any repeat numbers in the brackets, or your file will call the wrong one.
Go to functions.php. In the language to variable assignment sections, add in your new variables and the corresponding number from the language file, like so:
-
$typeplan_label = clean_var(lang_strip($lang_array[84]));
-
$typeplan1_label = clean_var(lang_strip($lang_array[85]));
-
$typeplan2_label = clean_var(lang_strip($lang_array[86]));
-
$typeplan3_label = clean_var(lang_strip($lang_array[87]));
-
$typeplan4_label = clean_var(lang_strip($lang_array[88]));
-
Make sure they are in the same order as the language file or it will not work.
Scroll down to the posted data section. Add a new line for each field, like so:
-
if(isset($_POST['typeplan'])) {
-
$typeplan_value = clean_var($_POST['typeplan']);
-
}
-
Add a line in the exploit filter matching:
-
preg_match($inpt_expl, $typeplan_value) ||
-
and below that:
-
if(preg_match($inpt_expl, $typeplan_value)) {
-
$expl_typeplan = '<a href="#typeplan-error">'.$typeplan_label.'</a>,';
-
$typeplan_border = $error_border;
-
$typeplan_errlbl = $error_label;
-
}
-
put it in the user message list below that -
then smarten up the email by adding a section there:
-
if($typeplan_value == "") {
-
$typeplan_email = "";
-
} else {
-
$typeplan_email = " $typeplan_label : $typeplan_value\n";
-
}
-
Finally, put it in the email build here:
arranging it where you want it to show up in the email.
Save and upload. You should be able to add as many additional fields as needed this way. At least, it worked for me, and if it doesn't for you at least you've got a starting point.