I have a CPT "Cake". It has an Elementor template assigned. So far so good.
I wanted to build an "Edit Cake" form - and I did, as described here
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/?utm_source=formsplugin&utm_campaign=forms&utm_medium=forms-gui&utm_term=forms-editing-doc
I created a view, that shows all cake by an Author, and added the "edit post link" shortcode. When clicked, the link doesn't show the post edit form, instead, it shows the post. When I temporarily deleted the template in Elementor - it worked OK.
Is there a way around this? i.e keep using the Elementor template, and have the edit cake form working?
Thanks
Hi, you must update the latest version Elementor Pro to access the new integration features. To get the Edit Post Link to work, you must add a Post Content element to your Elementor single post template for Cakes. You must not assign a Toolset Content Template to single Cake posts. Then the Edit Post link from the View should redirect the User to the Cake single post URL with the content template ID in a URL parameter. The edit Form should appear on that page.
Thanks
It worked - but...added the post content element at the end of the template, now I get all the Cake Feilds first, and then the form. Will it be possible to somehow show only the form when editing the Cake?
Example URL
hidden link
As of now, that's not possible. The Form is displayed inside the post content area, which is displayed inside the Elementor Template. Hiding other portions of the Elementor Template would require custom code.
"custom code" - could you give me an estimate of what it will take? Are there any hooks that I can use for this?
Thanks!
In Toolset we have conditional HTML that can be used to show and hide content based on some variable, like the page URL or parameters. However, with Elementor it's not as straightforward to conditionally show elements because you can't wrap them in shortcodes like in Toolset. So that would require some assistance from Elementor to be able to conditionally display or hide elements, or to programmatically manipulate which Template is applied to the page. I'm really not sure how it can be done, so I don't have any examples to share.