Skip Navigation

[Resolved] Can't assign a Layout to a CRED Form that is supposed to edit a draft

This support ticket is created 7 years, 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by Nicholas 7 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#440835

Hello.

I have this [cred_link_form form='8258' form_name='demo' text='Edit' target='_self'].
The user should be able to edit his draft when he clicks on the link.

Now I would like to assign a layout to this "edit post form". How's that possible?

The form is now only displaying on a regular page. I haven't figured out how to get it to work with a layout.

Thanks for your help.

Nicholas

#440846

Also I can't get this shortcode to work
[wpv-post-edit-link text='Edit']
Basically I am display the draft of a post type with a View. In the view I want to insert an edit button.
When the user clicks on that button he should be directed to CRED post form that can edit his content.

The CRED post form should be used with a layout.

#440935
Ontop.png

Awesome. I got this to work. I forgot to add a default layout to my post type.

Now I've run into a new problem. The CRED edit form doesn't display as I want it to be.
The CRED edit form shows up below the content of the post type. (see image).
However I would like to have only the CRED edit form displayed when I edit the page.

#440950
demo.png

Basically I am using the Classifieds reference site as an inspiration.
There the CRED edit form gets it's own page. (see image)
That's exactly how I want it to be.

#441031

Hello I found this code: I am not sure what it does and if that's what I need...

add_action( 'template_redirect','show_full_width_cred_edit_form',50);
function show_full_width_cred_edit_form() {
if (isset($_GET['cred-edit-form'])) {
//Check if we are editing page
$id=$_GET['cred-edit-form'];
$post_id=intval($id);

if ($post_id > 0) {
//Post ID exist, we are editing page.
//Let's define full width template path
$stylesheet_directory=get_stylesheet_directory();
$template_path=$stylesheet_directory.DIRECTORY_SEPARATOR.'template-fullwidth.php';

if (file_exists($template_path)) {
include($template_path);
exit();
}
}
}
}

#441032

Ups I accidentally closed this ticket.

#441351

Dear nicholas,

You can try the solution of another thread:
https://toolset.com/forums/topic/cred_link_form-not-working/

#441413

Hello. Thank you for the link. I'll give this a try.

Do you know why the toolset classifieds reference site CRED edit post form has it's own layout, as shown in the image above??

#441493

Thank your very much.
I got it to work.

Nicholas

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.