Skip Navigation

[Resolved] Cred form is not displaying the post after submit

This thread is resolved. Here is a description of the problem and solution.

Problem:
Cred form is not displaying the post after submit

Solution:
There was the issue with the child theme used by user.

You can find the proposed solution in this case with the following reply:
https://toolset.com/forums/topic/cred-form-is-not-displaying-the-post-after-submit/#post-1151253

Relevant Documentation:

This support ticket is created 6 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by KentS9937 6 years ago.

Assisted by: Minesh.

Author
Posts
#1149424

I have a CRED form which upon submission should display the post (job application), but it's not. I checked the settings for the form and confirmed it's set to "Display the post". I verified the post entry is being created so I know the form is working.

I have a View which lists all of the job applications. When I click on the post it does display in the correct layout template. So I believe the template is working and the form is working. It's just not displaying it after submission.

Can you provide suggestions on what might be causing a form to not display the post after submission?

#1149811

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I see you are using the redirection plugin, what if you try to disable it for a moment and try to check your issue?

if your issue still persists - I need problem URL where you added your Toolset form and access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1150531

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - what if you try to add following code to your current theme's functions.php file:

add_action('cred_save_data', 'func_attach_layout_to_job_application',10,2);
function func_attach_layout_to_job_application($post_id, $form_data){

   if ($form_data['id']==3326){  // 3326 is your Form ID
             // 'template-for-job-applications' is your layout slug which you want to assign
            update_post_meta($post_id, '_layouts_template', 'template-for-job-applications' );
   }
}

More info:
=> https://toolset.com/documentation/user-guides/cred-api/#csd

Now try to create job application:
=> hidden link

#1150772

I added the code to my functions.php but it didn't fix the problem. No change in the behavior.

#1151253

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - it looks like the there is issue with the third party plugin you are using or theme but it looks like most probably the theme.

I switched the theme to 2017 and once you submit the form it redirects you to correct page (Display the post) works.

I see you are using the GeneratePress theme so I installed and activated the latest GeneratePress theme version 2.2.1 and created the form and set the form settings to "Display the post" after submit and it just works fine.

- Could you please confirm that the redirection works properly with 2017 theme.
- Additionally, the form is set to submit with AJAX but do not see it's submitted using AJAX submit.

In order to minimize the cause of the issue:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?

Please check with the default theme and only Toolset plugins active and let me know what you found.

#1153179

Thanks for your help. I see the form is submitting and displaying properly with the stock GeneratePress theme. That suggests my problem is in the child theme. I'll investigate the Child theme further. Thanks for pointing me in the right direction.