Forums

Avoid POST null variables?

lelias2k 25 Aug, 2009
Is there a way to avoid the empty fields to be sent on the email?

I have a very long multipage conditional form, which I believe most times won't have all fields completed. I'd like to reduce the size of the email (and possibly the bandwidth usage), by not posting these fields.

Thanks!

Luciano
GreyHead 25 Aug, 2009
Hi Luciano,

Yes, but at a price in your time.

You'll need to re-code your email template using PHP to check which fields have entries and skipping over teh ones that don't.

Bob
lelias2k 25 Aug, 2009
Thanks Bob.

Can I include the PHP code directly in the Chronoforms email template?

Luciano
GreyHead 25 Aug, 2009
Hi Luciano,

Yes - PHP must go inside <?php . . . ?> tags. To enter PHP (or raw HTML) correctly in the Email template you need to turn off the HTML Editor in the Email Setup Properties Box, then save the form. When you re-open the form the Template edit box will be a plain textarea and code will save correctly.

Bob
lelias2k 25 Aug, 2009
Thanks Bob.

I'll give it a try!

Luciano
This topic is locked and no more replies can be posted.