Home › Toolset Professional Support › [Resolved] call jquery after cred-delete-post
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.
This topic contains 28 replies, has 2 voices.
Last updated by Christopher Amirian 2 years, 5 months ago.
Assisted by: Christopher Amirian.
Hi there,
The principle is the same, you need to add the Form to the view:
[cred_form form='slug-of-the-form']
Use the slug of the form that you created.
The number that you see in the jQuery code is the ID of the form and not the view.
So if you use another form just change 4485 with the ID of teh new form in the code.
Thanks
Yes, I did all that. Seems to be a jquery problem...?
Hi there,
I do not think it is a jQuery issue as the hidden link page does not have any delete button that should be there as an indication of the form addition.
I do not have access to the website and I can not check the issue, if you need further assistance please give me the information below in the next reply which you would set as private:
- Login information so I can access the hidden link page info.
- The ID of the form that you created.
- The name of the view that you used.
Thank you.
Hi there,
Thank you for the information. The problem was that you did not add the shortcode of the form that you created in the content template.
I went to Toolset > Content Templates > WUNSCH-Vorlage
And added the shortcode below:
[cred_form form='wunsch-loeschen']
After:
<h4 style="clear: none;">[wpv-post-title]</h4>
Now if you check the front end you will see that a new button is there that deletes the post. Please check the screenshot.
I did not touch any jQuery core and it works ok.
Feel free to change the position of the form shortcode to wherever you like in the content template code.
Thank you.
Thank you, Christopher
Like that, posts will be deleted, but they won´t be .hidden() - or do you see something else?
I didn´t add the shortcode in WUNSCH-Vorlage, but in the template "Beitrags-Meta" that is included in WUNSCH-Vorlage.
Hi there,
Please add the code to "WUNSCH-Vorlage". I also checked and with an animation, it removes the post. For example, it was the Test Hilfe post that was deleted.
I recorded a video to show you what I see on my screen:
hidden link
Thank you.
Hi Christopher, thank you.
Unfortunately, that´s not what I am seeing.
For me, it will not .hide() the post, even when using your new button.
What can make the difference? JS?
(If it won´t work, I will restrict deleting of posts to the view where it works, would be ok.)
Hi there,
Please kindly check with another browser or another machine. It might be something related to your browser.
I checked and it is working ok for me.
Thank you.
I checked with ~ 5 browsers.
Hi there,
I see that you again removed the submit button that I have added. So now I wonder where did you add the jQuery code?
My added form worked ok and I am not sure how you added the form and where so I do not know how to help here
At least in YOUR posts you should find the DELETE ("LÖSCHEN")-Button under "löschen" in the top right corner of the post.
Hi there,
The link there seems to be added in another place and that dropdown feature causes an issue with the code that I suggested.
Please add the delete form button in the section that I mentioned and it will work.
Thank you.
I don´t want it there.
Might it be a problem, that it´s in a nested template, not directly in the post template?
Hi there,
I tested quite a few points and it seems that you adding the form inside that dropdown causes the JS code not to work.
The code is not triggered.
You need to have the form inside the content for that to work.
Thanks.