Alright, I go it all worked out. Yeah!
Here's what I did...
Determined Form ID, Entry ID, and Field ID from Gravity form.
I then used phpMyAdmin to access my database and the wp_rg_lead_detail table.
Performed a search of the database for Form ID and Entry ID to determine wp_rg_lead_detail id number for the data line that includes the path to the image upload. Since I deleted all of the blank/untitled posts that Gravity forms automatically generated, the wp_rg_lead_detail id number no longer existed in the table. So, I located where it would have been and made note of its missing id number. I did that by looking at the id number above and below. So, if I saw an id with 105 above and 107 below, I determined that 106 was the missing/deleted id. (Otherwise, you could add a number so long as it does not conflict with other id numbers in the table.)
Note: I am using a hook to eliminate untitled blank posts for Image Posts and a hook to change default image upload path.
Then, I inserted all of this info as a new string to table as follows (Database field = Gravity Forms field):
id = wp_rg_lead_detail id number
lead_id = Entry ID
form_id = Form ID
field_number = Field ID
value = http://www.yourdomain.com/wp-content/uploads/image-folder/image-name.jpg|:||:||:|
So, after successfully adding to database, thumbnails appear again in the entries and image links are correct.
Then, I tested adding an image after a User submits a form and does not upload an image and it is possible following the same steps. The only thing you have to do is add a unique wp_rg_lead_detail id number. So, if the table uses id numbers 100-115, just make the id number 116 when you insert the new string.
While testing, I discovered that the Edit > Edit Post Image > Choose File does not work. So again, I would just edit in the database.
Thanks Chris for pointing me in the right direction.
Posted 11 years ago on Friday February 8, 2013 |
Permalink