I am trying to insert the link in a content template to edit a form. I have done this before but got totally confused. I have a form to make new records. I have a form to edit these records.
I have this link: [toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
Where do I put it?
Hi Beda,
I have a view with a content template (loop item in BP) which I target like this: [wpv-view name="bp" limit="1" offset="0"] with offset="1,2, or whatever". That works fine.
I have the following 'edit link' in there, which shows up and works but points in the wrong direction.
[toolset-edit-post-link content_template_slug="edit-bp" target="blank"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
There is a post form to edit the post: "Formulier voor Editten Begeleidingsplannen" (form to edit Begeleidingsplannen, which is a custom post type).
I have read the page "Displaying CRED editing forms" (https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/) 5 times.
Could you point me in the right direction?
I think you experience this BUG:
https://toolset.com/errata/views-ajax-pagination-url-parameters-are-added-to-cred-user-edit-links-in-a-user-view-loop/
This was however reported for user forms.
But eventually, this shows as well on Post Forms.
Basically, you create a Content Template (if you do not use Toolset Layouts) and add the CRED Form in there:
[cred_form form="test-form"]
Then, elsewhere, for example in a View, you insert the Edit Link, passing that above created Content Template:
[toolset-edit-post-link content_template_slug="the-template-with-cred-form"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
As said, in a View this may result with above-linked BUG
Hi Beda,
Thanks for your help. However still no luck.
The view with the link has no pagination.
To select the record I want I use this
[wpv-view name="Bp" limit="1" offset="2"]
.
The link I use is
[toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
I tried the link in the article like this:
<a href="[wpv-bloginfo show='url']/begeleidingsplan/klant1/?content-template-id=1754&user_id=[wpv-user field='ID']">Edit This user: [wpv-user field="user_login"]
</a>
Related question: When the link works I would like to have it visible for another user role (next to Administrator) also. I tried like this
[toolset_access role="Administrator,another-role" operator="allow"]
...
[/toolset_access]
but it did not show up for the other role.
But first things first.
- Can you tell me where this link points? What URL?
[toolset-edit-post-link content_template_slug="edit-bp"]Edit %%POST_TITLE%%[/toolset-edit-post-link]
- If you click the link, what happens?
- What is the URL of the post being displayed in the Loop (not the current page)?
Hi Christian,
The URL the link points to is: hidden link
If I click it I come to a page where I can see the record but not edit it.
If I understand you well it is hidden link
Okay so the edit post shortcode works - it redirects you to the correct URL. The URL exists and the page loads, but the CRED form is not shown. This seems to indicate a problem with permissions or with the Content Template, not the edit post shortcode. Can you try the following troubleshooting steps first?
- Temporarily deactivate all plugins except Types, Views and CRED, then activate a default theme like Twenty Seventeen and try again. If the problem was resolved, reactivate your theme and other plugins one by one until the problem returns. Let me know what you find out.
- Share all the code you have placed in the Content Template with ID 1754.
- Open the browser console and watch for any JavaScript errors that appear when you try to load the Edit Post CRED form.
Hi Chris,
Your logic brought the solution. But slightly different then what you are inclined to think. I must confess I have been using the new betas of Types, Views and Forms (Cred). They seemed to work flawless but together with Beaver Themer ( important plugin from Beaver Builder guys) it did not work. That combination was the cause.
Please pass this on to the development team so they can fix it for the final release.
Footnote: as I have still some weeks to go developing this site I thought it would be safe because by that time there probably would be stable versions. I learned a lesson and thank you for solving it. I have another question which I will start a new thread for (tomorrow, it's almost midnight here). Please close this one.
Muchas gracias señor!
Sorry, I was too quick. Still, also with the 'old' versions it is Beaver Themer that causes the mishap = not being able to edit on the front. User forms are no problem, I can edit those on the front.
Shall I pass this on to Beaver Builder also?
Thanks for the input, I would like to present that issue to my developers so we can get it resolved as soon as possible. Could you provide a SQL dump file from your database so I can try to recreate the problem locally? I will activate private reply fields here so you can share a download link. The fields say "duplicator package" but any download link is fine.
The Javascript error I got was:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.form.min.js.map, line 0)
Hi Chris,
I do not get the secure form.
Let me try again, please find the private reply fields here.
Thanks, I am able to see the problem here and I have escalated to my 2nd tier support team. I will keep you updated here as I receive more information.