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.

pre-populate image field

  1. sascha
    Member

    Hi there,
    is it possible to pre-populate an image field? It does not seem to have that option. Is there maybe a workaround?

    Posted 7 years ago on Tuesday February 7, 2012 | Permalink
  2. The image field is a standard HTML file upload ( type="file" ) field and can't be pre-populated. It's designed that way primarily for security reasons.. it's not a Gravity Forms limitation, but just how the input works.

    For example, someone could pre-populate the field with the path to a common file on your computer that might contain sensitive information.. they could hide the field from view and when you submit the form you unknowingly upload that file with your grandma's super secret double chunk chocolate chip cookie recipe or whatever it might be.

    Posted 7 years ago on Tuesday February 7, 2012 | Permalink
  3. sascha
    Member

    Hi Kevin,

    ok understand that. Maybe pre-population is not what I need then, or have to work without. Can I change the value of an image field though before submission? If $entry[5] would hold the value of an image field, could I populate that with a hook/filter like gform_pre_submission or gform_post_data?

    Posted 7 years ago on Wednesday February 8, 2012 | Permalink