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.

Setting default labels for custom fields

  1. Hi there,
    Sorry - I've been at this for quite some time and not found a good solution!

    When creating a form, with some inbuilt field types, such as "Email" and "Captcha", the label is populated with a default value ("Email" or "Captcha" as oppose to "Untitled").

    When creating a custom field type, how do I set a default label value like this?
    I've tried altering $field['label'] on gform_field_content and gform_field_input hooks, but it looks to be too late by then. So short of completely rewriting $content on the gform_field_content hook, what can I do?

    Any help much appreciated!
    Thanks,
    Kane

    Posted 12 years ago on Wednesday August 8, 2012 | Permalink
  2. The following page has the answer for you. The example seems to be exactly what you are trying to do.
    http://www.gravityhelp.com/documentation/page/Gform_editor_js_set_default_values

    Posted 12 years ago on Wednesday August 8, 2012 | Permalink
  3. That's absolutely perfect. Thanks very much! This plugin never ceases to amaze me :)

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  4. Thanks for the support. Glad that works for you.

    Posted 12 years ago on Thursday August 9, 2012 | Permalink

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