Skip Navigation

[Resolved] CRED: Create new related post while on parent editing page

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

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 12 replies, has 2 voices.

Last updated by Christian Cox 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#562593

Tell us what you are trying to do?
I am trying to provide a link to create new related post (PUSH) while on an editing page of the prospective parent.

Is there any documentation that you are following?
CRED shortcode docs. Couldn't find anything else.

What is the link to your site?
hidden link

On this page scroll to the bottom of the form and you will see a View that shows:

CDWG First push message August 22, 2017 publish Edit

The edit there works. Below that I would like to provide a link to allow the user to create a new push entry. I tried the following in the Loop Output editor of the view that creates the above output. I also tried the same on the parent Edit Exhibitor view. The below fail in various ways, the output of which you can see on the page.
[cred_child_link_form form='push-create' parent_id="-1"]
[cred_form form='push-create' form_name='Push Create']
[cred_link_form form='push-create' form_name='Push Create']

#562596

Hi, are the shortcodes you mentioned placed inside the parent edit CRED form? If so, that's probably why none of them are working as expected. My first advice is to remove these shortcodes from the CRED edit form. Then recreate (not just cut and paste) the cred_child_link_form shortcode somewhere outside the CRED edit form in your Layout or Content Template for the page at /baserad/exhibitor/cdwg/

[cred_form form='push-create' form_name='Push Create']

^^ This is the shortcode to display a full CRED form, but you can't place one CRED form inside another. That would be invalid HTML, because you cannot nest forms. Delete this shortcode.

[cred_link_form form='push-create' form_name='Push Create']

^^ This shortcode is used to create a link to edit an existing post, not create a new post. That's why you're seeing the error message "Edit form link can not be displayed (post type mismatch)." You can delete this.

Let me know if you have additional questions about this.

#562599

I've removed my failed attempts you explained. To answer your question, I had these links in the view that generates the list of pushes as well as in the parent page (edit exhibitor). For now I have left

[cred_link_form form='push-create' form_name='Push Create']

in the View.

This still leaves me with my intial ask "I am trying to provide a link to create new related post (PUSH) while on an editing page of the prospective parent."

The Exhbitor edit form now ends like this:

[/credform]
[wpv-view name="push-notifications-by-exhbitor"]
[cred_child_link_form form='push-create' parent_id="-1"]

Not sure if this is the best approach, but in the interim I came up with a page where I placed the "Push Create" form. I can link there fine. Now, if I can pass the id of the page I want to be the parent that would accomplish what I want (and I could hide the "parent" section on that form). Sadly this ticket says that's not possible. Still true?
https://toolset.com/forums/topic/how-to-pass-information-via-the-cred_child_link_form-shortcode/

#562601
Screen Shot 2017-08-22 at 6.14.15 PM.png

I am trying to provide a link to create new related post (PUSH) while on an editing page of the prospective parent.

You can do just that by recreating the cred_child_link_form shortcode somewhere outside the CRED edit form, as I mentioned. This is the shortcode you had before:

[cred_child_link_form form='push-create' parent_id="-1"]

This shortcode will work outside the CRED form, assuming that this page is the single post page for the CDWG post:
/baserad/exhibitor/cdwg/

So edit your layout that is used to display the CDWG post, and insert your cred_child_link_form shortcode in a Visual Editor cell somewhere outside the CRED form. See the attached screenshot for an example. In this configuration panel you must select the Child Form Page - for you it will be the Push Create page. You must also specify how to set the parent in the child form. I think in your case you should Set the parent according to the currently displayed content. This is the option you should choose if the link is displayed on the CDWG post.

Let me know the results and we can go from there.

#562615
Screen Shot 2017-08-22 at 7.18.38 PM.png

The result is that the dialog box from your screenshot is not responsive on Chrome or FF on my Mac. Manually entering the shortcode does not work.

If you are correct in that should work then you have a bug in the plugin. I am using v1.9.2 pf CRED. The rest can be seen in the screenshot.

Send me that special message and I'll provide you a login for the sandbox.

#562753

Private reply fields enabled here. Please let me know where you are attempting to insert the CRED child link shortcode, and where I can find the page with the child CRED form. Thanks!

#562796

I'm not able to log in with those credentials. Will you take a look?

#562817

Ah, sorry, the username is "wptypes".

#562868

Okay I see what you mean, I'm able to reproduce the same problem. I will reach out to my 2nd tier support team to figure out what's going on here. In the meantime, I've added this shortcode to your Exhibitors Layout:

Test: [cred_child_link_form form='19494' parent_id='-1' text='Create PUSH' target='_blank']

This appears to be working now, if you scroll down to the bottom of the page (this was confusing me, so be sure you scroll all the way down) you'll see the test link. 19494 is the ID of the page where your New Push CRED form is displayed. You can modify the text any way you would like. Let me know if this isn't working as expected.

I will let you know as soon as I have some additional information regarding the problem inserting the link using the GUI.

#562965

Thanks for the workaround.

I'll leave this ticket open to hear about the GUI issue.

#588106

Hi, the latest version of CRED, v 1.9.3, has been released and includes a fix for the autosuggest issue you have experienced. Please update to the latest version and let me know if the problem is not resolved. Thanks!

#588264

I'd like to give that a try. When I try to install the update I get "The package could not be installed. (PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature)"?

#588266

Hi, sometimes if you retry the automated download will complete successfully. If not, you can download the plugin from wp-types.com/account/downloads, log in to your server using FTP, delete the folder at wp-content/plugins/cred-frontend-editor, and install the latest version manually. Your forms will remain in tact, only the plugin files will be replaced.

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