WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: seanie_morris on September 09, 2015, 04:25:48 PM

Title: I want to allow blank fields in the checkout form to pass through
Post by: seanie_morris on September 09, 2015, 04:25:48 PM
Hi,

I successfully modded the checkout form for some fields, but the one last hurdle I have is where a field is blank, I want to let it pass. Now, my coding is not so great, but I do know that from line 31 in save_form.php with:
Code: [Select]
// Check for blank fields
foreach ($_POST as $field => $value) {
// Except of these fields...
if ($field != 'cust_tax_no' && (strpos($field, 'company') === false)) {
if ($value == '') {
$blanks[] = $field;
}
}
}
is the key. I want to add the fields 'child_names' and 'zip' to be allowed if they are blank. Can anyone help me please?

Seanie.