Skip Navigation

[Resolved] Permission denied for editing forms

This support ticket is created 5 years, 8 months ago. 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 29 replies, has 4 voices.

Last updated by FelipeP5703 5 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#1229013
#1229883
Bildschirmfoto 2019-04-12 um 14.31.17.png

I see you used a slightly wrong approach of creating the Elementor Templates.
They are all made for type "Page".
When creating Elementor Templates like this, please choose the settings as I show in the Screenshot.
DOC:
hidden link
https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/create-templates-for-custom-post-types-with-elementor-and-toolset/

On the Currently assigned template of Anuncios, when I view a CPT of type Anuncios, I see no Edit Post Form Link.
Also when editing the "Template para anuncios" I see no Forms Edit Link or Form at all.

Hence, this cannot be that it will replace (or not replace) the post content by the form, as the form or link to it simply is missing.

I hence created a Single Template like I show in the screenshot and inserted the desired Toolset Edit Form Link.
I use the Content Template "Editar Anuncio" to display the form.
Hence, the link becomes like this:
[toolset-edit-post-link content_template_slug='editar-anuncio' target='self']Edit %%POST_TITLE%%[/toolset-edit-post-link]
In the Content Template I see you already inserted the form correctly ([cred_form form='formulario-para-editar-anuncio'])
I also inserted Title, Body and Fields using dynamic Elementor Widgets.

Now, the post itself will show a Link to edit the post, once clicked, it will show only the title, and the fields added outside the post body, but it will replace the post body with the form.
==> The Fields, are not part of the Post Body here and cannot be replaced.
==> If you want only a Form showing then you would have to put all the Fields inside the Post Body, and then render that with Elementor.

#1230139
Single Template2.jpg
Single Template.jpg

Beda,

I did use the Single template for Elementor so I don't know what you are talking about. See Image.

1) I do not want a link to edit the post ON the post.
2) I created My Account (Minha Conta) so it can show all the Anuncios (Custom post) that the author (user) has created, and there it should show a link to Edit. (Which I have, see screenshot).
3) When clicking on the Edit link, it should take me to Elementor Single Template, which it does, but it does not replace the content. It only shows the form underneath it.
4) I'm tired of this back and forth with only explanations to the problem instead of giving steps by steps to fix it.

I kind of regret getting this plugin... more of a headache than a solution

#1230358

Well, this is what I see on the duplicate.
It was a "pages" layout.
However, if you currently use Single on your install, that would be the way to go so you can leave it as is.
If you are using Page, you'd have to change that as per hidden link and https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/create-templates-for-custom-post-types-with-elementor-and-toolset/

1. This is what I understood, you want to edit that post with a form and the right way to do that, is to create a link to edit the post.
Now, if you like the form directly on that post, you can do that, but then it won't replace anything, instead, display along with any other element (inclusive post body) on the post. It is suggested to use the edit link.

2. I am not sure what you refer to in #2 above. The discussion in this ticket is about how to edit those single posts, correct?
Whether you are in a single post, or a list of posts (view) you would generally use a link to the form
Note that Views Loops cannot be customized with Elementor, only single Posts can.

3. When clicking the edit link it will not - and should not - lead to Elementor's template use the Content Template which you created already. When inserting a Toolset Forms Edit link it will ask you (mandatory) to pass the Content Template in which you inserted your edit form
That template will then replace the Content Cell on the elementor template. But only the post body (content Cell) and not other data like title, fields, taxonomy, etc that are not within the post body.

4. I think I gave precise steps here:
https://toolset.com/forums/topic/permission-denied-for-editing-forms/page/2/#post-1229883

If you try to achieve something else than described in that answer, please accept my apologies for not having understood.
Note that integration of Elementor and Toolset is made as it is, we cannot currently enhance it (we can fix issues that are broken within, but not add new features to it)

If you see the form underneath content currently, it is likely that this content is, as described, not from the post body but from the fields you inserted dynamically. Those will not be replaced, as they are not part of the_content() function of WordPress, but only part of the page (but inserted outside the content)

Please let me know if there are unclarities with this.

#1230601

Is there anyone from support who speaks Portuguese (Brazilian Portuguese preferably), maybe there is a "lost in translation" going on here.

#1231383

Not at Toolset Support, unfortunately.
I speak Portuguese but not with professional proficiency.

Maybe you can write in Portuguese, I can if I do not understand, ask Adriano from our WPML team, he speaks and writes Portuguese fluently as the native language.

#1231547

Could I get Adriano's email or contact info please? Or maybe he can contact me? You have my email on file correct?

#1232032

We do not provide support outside the boundaries of this forum or the chat, see https://toolset.com/toolset-support-policy/
I can ask Adriano internally to help with a translation in case I come not clear with it.
He, however, does not permanently work in Toolset Support and I cannot loop him directly to this thread as he has other tasks assigned.

Please let me know if I have misunderstood, please refer to the different solutions mentioned here:
https://toolset.com/forums/topic/permission-denied-for-editing-forms/page/2/#post-1230358

Please feel free to add details as well in Portuguese, we will (with internal help) be able to understand.

#1232275

Well, I'm already pretty lost with all this information... how about we do this. I'll start from scratch. I will record it then you correct me where I am not doing it correctly. Ok?

#1232317

Here is the video: hidden link

Thank you!

#1232655

First, you are not going wrong, you are doing precisely, exactly what you heard from us.
You insert the Link to the Form in a View, and that leads to the Single Post in Edit Mode.
For this, a Pot Content will be required in that post, and it's the only that'll be replaced.

The Custom Fields will stay.
One way is, to solve this, putting all custom fields in the post body with shortcodes. Then, render them thru the Post Body, which will be replaced by the form once in edit mode.

So far everything you did and see is expected.

Now, I do understand your request, but it's not possible if following the workflows suggested and documented.

There is a solution, however.

1. Create a new page, call it "Edit Posts Page" or similar
2. Assign the Content Template with the Form to above specific page ("Edit Posts Page" or similar)
3. In your View where you display all the single links to the edit forms (Minha conta), change the Link. Do not use Toolset's "Edit Post Link", instead, use a Custom HTML link:

<a href="[wpv-bloginfo show='url']/edit-page/?post_id=[wpv-post-id]">Edit [wpv-post-title]</a>

4. In the Content Template with the Edit form, change the Edit Form shortcode as follows:

[cred_form form='testing' post='[wpv-search-term param="post_id"]']

When you now click on "edit" in the posts list (ads list) in minha conta page, you will be taken always to the same "Edit Posts Page" where you will see only the Form - already populated with the data from the correct post, since we passed that along with the URL parameter "?post_id="

This will show only the form, no data of the post at all.

#1232807

Thank you for your help... there is just one last thing: hidden link

#1233156

You can change the [wpv-post-title] to use the "post_id" attribute which we pass to the URL when visiting the form.
Hence:
[wpv-post-title item="[wpv-search-term param="post_id"]"]

Since we have the ?post_id in the URL when visiting this page, it will then display the post title by that ID (which is the post we edit, not the post where we inserted the form).

But, I saw something in the video which I need to correct, I believe my previous steps where not precise enough, please control this below:

1. Create the Form to edit posts.
2. Insert this Form in a New Content Template like follows:

[cred_form form='name_of_your_form' post='[wpv-search-term param="the_parameter_you_choose"]']

Change name_of_your_form to the name of your Post Edit Form
Change the_parameter_you_choose to anything you like, you just need to remember it for later.
3. Create a Page "Your page Name" (slug: your-page-name) and assign the Content Template of #2 above to this page.
4. Create a View, list all posts you want to edit, and insert the HTML link as below:

<a href="[wpv-bloginfo show='url']/your-page-name/? the_parameter_you_choose =[wpv-post-id]">Edit [wpv-post-title]</a>

Change your-page-name for the realk slug of the page created in #3
Change the_parameter_you_choose to the paramater chosen in #2
5. Insert this view in the "minha conta" page to see the links to edit the single posts.
Click on those links to be led to "your-page-name", where the form will let you edit the precise post with ID as passed in the URL parameter the_parameter_you_choose

Now, if a Post Title or any other shortcode in the form does not display what it should, you can use the item="" attribute and pass the [wpv-search-term param="the_parameter_you_choose"] in it.
This will listen to the URL parameter and call the right posts data.

Please let me know if anything isn't clear 🙂

#1233427

Thanks Beda.

So it was working before the new suggestion you gave, but I followed what you mentioned and it is working the same. Why did you suggest the new way? Anything specific reason?

#1234184

Because, as I mentioned, I saw in the previous video that the Content Template was never used.
It is working like that too, however, the documented way is to use the Content Template with the form, instead of inserting the form directly to a page.

The new HREF edit link is to be used because Toolset Forms edit link won't allow such dynamic edit mode on always the same page, it will redirect you to the single post, which you do not want.

I hope it's clear, please let me know if not