Sauter la navigation

[Résolu] featured image editing via cred form

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

In editing post form, I am not able to delete or change the Featured image.

Solution:

You can use WordPress Media Library in the post form, by this:

enable option:
Use the WordPress Media Library manager for image, video, audio, or file fields

Relevant Documentation:

This support ticket is created Il y a 2 années et 11 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Ce sujet contient 5 réponses, a 2 voix.

Dernière mise à jour par AndreG3332 Il y a 2 années et 11 mois.

Assisté par: Luo Yang.

Auteur
Publications
#2265371

I have a membership site The WordPress user is registered used for login and then I have created a CPT for the profiles. In the CPT profile, there is an option to load the featured image. I used the post forms to create the capture some of the information.

Then I created a "find an editor" page that is basically the archive "template" of the editors CPT. This layout covers all the important fields of the archive of the CPT.

In this form, there are buttons that open an edit form in a popup screen if the specific section in the editors from the file needs to be updated or change. However, i am not able to delete or change the Featured image. I have tried to delete it and saved the record with no success. PS the edit buttons is only available when the user or admin is logged in. I will supply credentials if need be.

This is the code I use in the field in the edit form it self

<div class="form-group fi">
		<label for="%%FORM_ID%%__featured_image">
          		[cred_i18n name='_featured_image-label']
          				New profile image
          		[/cred_i18n]
      	</label>
				[cred_field field='_featured_image' output='bootstrap' previewsize='thumbnail']
	</div>
#2266185

Hello,

The delete image button was hidden on purpose, you can display it with CSS codes, for example:

button.button-link.delete-attachment {
    display: block !important;
}

Then on the frontend, in the editing post form, under the featured image field, click button "Replace image", find and select one of your image, you should be able to see the button "Delete permanently"

#2266199

Hi Luo,

Thank you for your reply. I have tried it with no success. I tried by anding the code to the CSS of the respective form and by adding it to the additional CSS in the customiser.

#2266205

Please share your website credentials in below private message box, also point out the problem page URL and form URL, I can setup a demo for you

#2266221

I assume we are talking about the post form "Editing forms for editors Profile - Contact details":
lien caché

If you want to delete the image from WordPress media library, please edit above post form, in section "Settings", enable option:
Use the WordPress Media Library manager for image, video, audio, or file fields

Click "CSS Editor", add the CSS codes I mentioned above.

Test it in frontend, you should be able to see the "Delete permanently" button by below steps:
under the featured image field, click button "Replace image", find and select one of your image, you should be able to see the button "Delete permanently"

More help:
https://toolset.com/course-lesson/using-the-native-wordpress-media-manager-in-front-end-forms/

#2266327

My issue is resolved now. Thank you!