Hi,
For your first question, I'm not sure where you want to put the validation. However let's make an example, let's say you need a user to fill a number field value greater than 10, otherwise it'll show an error. To do this, you need to edit "includes/post-functions.php" file, go to around line 238 and you'll see these code :
$validation_result = validate_element($target_input,$rules);
then put these code exactly bellow that line
if ($form_id == 7 && $element_id == 3) {
if ($element_data < 10) {
$error_elements[$element_id] = "You need to input a number greater that 10";
}
}
That code will work for form 7 with number field id 3, you need to change those ID's with yours.
And for your second questions, you need to edit "includes/helper-functions.php" to set drop down prefix in mail notification. Go to around line 355 and you'll see this code :
$email_body .= "<tr {$row_style}>\n";
then put these code exactly above that line
if ($data['element_type'] == 'select' && $data['element_id'] == 2 && $form_id == 7) {
switch($data['value']) {
case 'First option':
$data['value'] = 'A1 - ' . $data['value'];
break;
case 'Second option':
$data['value'] = 'A2 - ' . $data['value'];
break;
case 'Third option':
$data['value'] = 'A3 - ' . $data['value'];
break;
}
}
Those code will add a prefix based on your drop down selection and don't forget to change the id's also
MachForm Support