Hey Ed, are you talking about a Mezzanine form?  I think you could update
the email template to something like this (I added the check if there is a
value):


{% extends "email/base.html" %}

{% block main %}
{% if message %}<p>{{ message }}</p>{% endif %}
<table border="0">
{% for field, value in fields %}

{% if value %}
<tr>
    <td><b>{{ field }}:</b></td>

    <td>{{ value }}</td>
</tr>
{% endif %}

{% endfor %}
</table>
{% endblock %}

Here's the original for comparison,
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/forms/templates/email/form_response.html

If this isn't a Mezzanine form you could do something similar and just
check if the field has a value before rendering it in the template.


On Tue, Feb 4, 2014 at 8:26 AM, Eduardo Rivas <[email protected]>wrote:

> Hello all. I've created some Mezzanine forms in the admin to capture user
> input and send it by email. I'm using some JS to hide form fields depending
> on what a user selects in one of the fields. In other words, fields are
> shown/hidden depending on conditions determined by the form itself while
> interacting with the user. As such, depending on what the user does, some
> fields will be left blank. I would like to have these blank fields not
> appear in the email report. Any ideas on how to achieve that?
>
> Or going to an upper level, could you suggest an alternative approach?
> Maybe use multiple forms in one page?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to