FORMfields, the premiere web framework
Login
Support Home | Knowledge Base | Documentation | Forums | Contact Us
Info
FORMfields & FORMgen :: Email

Hiding Blank Form Data in Emails

(1454 views. Last Updated: 2010-04-14 9:24 AM)

To hide blank or empty form data from an email, modify your form and place the following:
    foreach ($ffForm->formFields as $fieldName=>$field) {
        if ($field->getData() && $field->isEmpty())
            $ffForm->formFields[$fieldName]->setHidden(true);
    }
just before the call to:
    $ffForm->email(...)
Info
Support | Earn Money
Copyright © 2005-2019 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.