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.

gf edit form post field 'custom-field' no 'image' type available.

  1. anointed
    Member

    I am adding in a 'custom-field' box to a post-type gravity form that I created.

    The problem is when I add the custom-field choice, I do not have the ability to select 'image' within the custom field drop down choices.

    I am only given
    single line
    paragraph
    dropdown
    number
    multiple choice
    etc...

    I already have created an image upload type metabox for my post-type.

    This means on the backend, when a user goes to input a new post-type 'testimony' I have a metabox with an image uploader called 'profile-picture'.

    Under normal wp operation, the user is able to select an image from their computer, and upload it to the post they are creating. This has been tested and works great.

    I am trying to bring this functionality into the front end via gf.

    I see gf has an 'image' post-field, which would work, but the problem is I don't see where to add the custom field to the image choice.

    Best solution for me would be to have the ability to choose a custom field, and in the drop down choices, have an image uploader choice that I can assign to my custom field.

    Is there a way to get this working in the interim?

    Posted 13 years ago on Monday May 31, 2010 | Permalink
  2. In order to do this you would need to write custom PHP to populate the path to the image in the custom field. There is no native feature to do this. We do plan on better supporting images and custom fields in the future, however using custom fields to store image data is a hack as it is because of how WordPress handles images. We could add the capability to do an image upload to a custom field, however you would have no control over the height/width/crop of that image so the image being uploaded would have to already be the appropriate height/width/etc.

    But as of right now, you'd have to write custom code to do so and use one of the post processing hooks to insert the value into the custom field from either the post image field or using the file upload field.

    Posted 13 years ago on Monday May 31, 2010 | Permalink
  3. anointed
    Member

    @Carl
    If you could provide me with the example php script I would need to use in order to populate the image custom field in my post-type, I can take care of the rest, i.e. resizing etc.

    Ultimately it would be nice when adding a custom field to gf, to have the option of choosing image upload in the field type dropdown. In the meantime, I am willing to use anything that would work. Basically I have to find some way of allowing the user to submit an image and have it saved to my custom post-type image box. I'm completely stuck without this ability.

    Posted 13 years ago on Tuesday June 1, 2010 | Permalink
  4. anointed
    Member

    After spending all day on this, I think I simply need to ask to pay to have this done. I've now read most of the gravity code, and tried multiple combinations of trying to send the output of the 'file' to a specific custom field for a given post type, but have had zero luck.

    Is anyone available that I could pay to write this snippet for me?

    --all I want to do is to allow a user to upload an image, and have that url saved in a custom field 'testimony-image' for my 'testimonies' post-type.

    So far I have it working where the user can add a title/body and it saves properly to the 'testimonies' post type as expected. Only thing I am missing is ability to add their picture, and eventually choose a custom taxonomy 'category' to place their article in. I'm still banging away on that one as well.

    thanks everyone

    Posted 13 years ago on Tuesday June 1, 2010 | Permalink
  5. Hey Shawn, I worked with you before on some Gravity Form customizations. Drop me a line at david@ounceoftalent.com if you need any help with this.

    Posted 13 years ago on Tuesday June 1, 2010 | Permalink