PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

[resolved] Keep field label in entry when field is empty

  1. mcdarwin
    Member

    Hi,

    I have a form where some fields are optional. If some of these fields are not filled by the user, the field label is not shown in the entry and my admin confirmation email.

    I want to keep the field label in the entry and confirmation email when it is not filled. Is that possible?

    The reason is that I copy the entry and have the information sorted by a script and I need all the field labels to be able to keep things in order.

    Thanks!

    Posted 14 years ago on Wednesday June 23, 2010 | Permalink
  2. If you have no value in the Field Label you can go to the Advanced tab when editing a field and use the Admin Label. The Admin Label is used on the backend for that field. This way if the Field Label is blank and you populate the Admin Label, there is a label for the admin to use for that field.

    Posted 14 years ago on Thursday June 24, 2010 | Permalink
  3. mcdarwin
    Member

    Thanks for this reply, but I tried your suggestion already and can't make this work.

    I have a single line text field and on the Proberties tab I have for example "phone" as a Field label and for the same field on the Advanced tab I have "phone" as Admin label. The field is not required.

    But if I submit the form with no information in this field I get no "phone" label in the entry or admin confirmation email. Like the field didn't exist at all.

    I have tried also with the new 1.3.12.2 version on a WP 3.0 intstall and it doesn't work either. I think perhaps it used to work, but I have now tried two different versions of GF without success.

    Hope you have a suggestion for me since this is a very important feature for me.

    Thanks...

    Posted 14 years ago on Saturday June 26, 2010 | Permalink
  4. I misunderstood your question. You are referring to fields that have no data.

    When viewing the entry on the entry detail page in the admin you can click the "show empty fields" checkbox located near the Info box in the top right of that screen.

    In the email notification you can use this hidden variable:

    {all_fields_display_empty}

    Posted 14 years ago on Sunday June 27, 2010 | Permalink
  5. mcdarwin
    Member

    Ah - that was nice, I had not noticed that option. It solves my problem completely - Thanks!

    Posted 14 years ago on Monday June 28, 2010 | Permalink

This topic has been resolved and has been closed to new replies.