Skip Navigation

[Resolved] Post Form with Featured Image. Created using HTML editor.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 4.72 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 1 year, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2648595

Tell us what you are trying to do?

A post form has been created using the HTML editor that contains a custom field "detail-image".

<div class="form-group">
<label for="%%FORM_ID%%_detail-image">[cred_i18n name='detail-image-label']Detail Page Image[/cred_i18n]</label>
[cred_field field='detail-image' force_type='field' class='form-control' output='bootstrap' previewsize='thumbnail']
</div>
<div class="form-group">

I want to change this to be the Feature Image, and not use "detail-image".

How do I do this?

What is the link to your site?
hidden link

#2648809

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please first go to:
=> Toolset => Post Types => Edit your desired post type and then make sure that you selected the Featured Image option to display with this post type.

Later edit the form where you want to add featured image and navigate to code editor section and click on the "Add Fields" button and with the popup presented with fields you should select the "Featured Image" and save your form.

#2648871

The Featured image is checked.

However, I do not understand adding the Featured Image to the form. I tried this and it is not visible. Does it need to include the other information <div class....>, <label..., etc. Could you just highlight where in the info from the HTML editor below where the Featured Image should be inserted?

<div class="form-group">
<label for="%%FORM_ID%%_detail-image">[cred_i18n name='detail-image-label']Detail Page Image[/cred_i18n]</label>
[cred_field field='detail-image' force_type='field' class='form-control' output='bootstrap' previewsize='thumbnail']
</div>
<div class="form-group">

#2649689

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You can add the featured image at your desired place in the form. There is no fix place to add feature image, having said that you will have to add featured image at some specific place that's not true. You can add the featured image at your desired place.

If you do not able to locate the featured image please let me know and send me the problem URL of your form and admin access details as well as tell me after or before what form field you want to add the featured image.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2649797

Thank you, Minesh. I was able to add the featured image successfully.

Please explain what this part of the label tag means or does.

for="%%FORM_ID%%_detail-image">[cred_i18n name='detail-image-label']

<label for="%%FORM_ID%%_detail-image">[cred_i18n name='detail-image-label']Detail Page Image[/cred_i18n]</label>

#2649809

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There must be custom image field "Detail Page Image" added to your custom field group of your post type.

#2649819

Yes, this form was initially created using the custom field "detail-image". I want to use the featured image instead of detail-image.

Do I just leave the attributes out, or should some of the attributes be used? Like this? (This works, but I want to know if the attributes should be there for some reason)

<div class="form-group">
<label>Detail Image</label>
[cred_field field='_featured_image' class='form-control' output='bootstrap' previewsize='thumbnail']
</div>

#2650101

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - you can keep those attributes for the featured image field. You should just remove anything related to your old custom image field if you do not want to use it from your form editor and save your form.

#2650945

Thank you Minesh. I was able to make this work.