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>
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"
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.
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
I assume we are talking about the post form "Editing forms for editors Profile - Contact details":
hidden link
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/
My issue is resolved now. Thank you!