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.

Possible Bug: Field Label Not Displayed in HTML Full Margin

  1. blafarmm
    Member

    When checking the "Disable Default Margins" option on an HTML field -- the Field Label is not displayed in any shape or form.

    This happens in Left Aligned, Top Aligned and Right Aligned forms.

    Not sure this is intended -- but it is definitely undesirable. The Field Label is an important component of the form layout and structure -- and it would be much better if the HTML content were displayed directly below the Field Label when selecting that option.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  2. blafarmm
    Member

    Thinking further about this subject ... I'm guessing this feature was intentionally left out -- as one can easily replicate the Field Label within the HTML.

    Sorry for the confusion.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  3. This is by design. The Field Label is not output with the HTML field.

    The HTML field is designed to be a free form content block. For maximum flexibility the field label is not output so that you have complete control over what is contained within the HTML block. This allows you to use the HTML block for any type of customization. It could even be used to add fieldsets to your form if you know what you are doing.

    If you want to have a field label for the field you can add the HTML within the HTML block to display the label.

    It is only displayed in the admin form builder as the content is not shown in the form builder so you can use the Field Label to identify the HTML block if you have multiple blocks on a form.

    We may consider adding an option to enable the field label output in a future release, but it is currently working as designed.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  4. blafarmm
    Member

    Thanks ... yes that makes complete sense.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  5. Carl, thanks for the support.

    How can I use hidden inputs in the HTML block, to be included with {all_fields} for notifications and emails?

    (And ideally, as an option in the dropdown list of inputs as well.)

    Thank you,
    - Tollie Williams
    tolliewilliams@gmail.com

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  6. If you wanted hidden inputs you would have to use a hidden field, not an HTML block. Gravity Forms needs to know how to handle the data that is submitted so a form field needs to exist on the form. So you would need to use the hidden field type and add them to your form and then either use the available default value variables or populate that hidden field dynamically using PHP.

    What you want can be accomplished with the hidden field that then makes field data available in the confirmation page, notifications, etc.

    The HTML field is purely for display purposes and adding form fields to your form not created using the form builder will not work because Gravity Forms won't know what to do with those fields.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  7. Carl,

    That's a shame. So, you're saying there is NO possible way that I can get information from the HTML block to the email?

    I'm willing to kludge if need-be.

    Basically, my needs are this:

    [table]
    [tr]
    [th]Number of Rooms[/th]
    [th]Number of People[/th]
    [th]Price[/th]
    [/tr]
    [tr]
    [td][input type=number][/td]
    [td][span]calculated and shown via javascript[/span][input type=hidden][/td]
    [td][span]calculated and shown via javascript[/span][input type=hidden][/td]
    [/tr]
    [/table]

    Where, all three inputs (the one entered, and the two calculated) are available to the notification emails.

    Any suggestions are welcomed, and would be appreciated.

    Thanks,
    - tollie

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  8. You could hardcode form fields in the HTML block, but Gravity Forms isn't going to save that data because those form fields don't actually exist on the form as far as Gravity Forms is concerned. Field shave to be added via the form builder for Gravity Forms to process them and store the data. It doesn't process any fields that exist on the page.

    If you want to do calculations you would have to write custom jQuery to do so on fields you add using Gravity Forms and then use jQuery to attach those events to those fields. I don't personally know how to do that, but it may be possible.

    We are planning on adding field calculations in a future release.

    The HTML block is purely for presentation purposes for adding additional text, HTML or images to your form in between fields. Data in the HTML block is only displayed, it isn't saved as a form field because it's not really a form field, it's a content block.

    Posted 14 years ago on Tuesday July 27, 2010 | Permalink
  9. Hi Tollie, I'm not sure I follow why you are using the fields inside of an HTML block as opposed to just adding those hidden fields to the form itself?

    Regardless, if you do need those fields to be in the html block, you could create corresponding fields in the form itself and use jQuery to automatically populate the GF fields with values pulled from your HTML fields. When the form is submitted, the GF fields would be included in the {all_fields} token.

    Let me know if that makes sense.

    Posted 14 years ago on Wednesday July 28, 2010 | Permalink
  10. Hi David,

    Thanks. Your suggestion makes sense. In fact, it is something I had already considered, but hoped there might be an integrated solution. eg. I hoped GF might be pseudo-intelligent enough to find the input fields within the HTML block.

    As to why, the first reason was because I'm basically collecting tabular data, and having the numerical inputs inside of table cells, while adjacent cells use jQuery to display calculated results, makes a lot of sense.

    The second reason, for the hidden (calculated) inputs, was so that I could address them directly using unique classes without having to use wordpress custom fields on a page by page basis. In other words, I wanted to be able to code my template with the GF HTML block in mind, rather than have to pull in data from wordpress in order to manipulate fields.

    That leads me to a question, which I'll post in its own topic. update: posted it here: "Use jQuery to fill in fields".

    Thanks,
    - tollie

    Posted 14 years ago on Wednesday July 28, 2010 | Permalink