Skip Navigation

[Resolved] Child not being assigned to parent.

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

Problem:

The issue is that the user's [cred_child_link_form form='295' parent_id='-1' text='Submit your Homework for this Assignment' target='_blank'] is not auto assigning the parent on the actual form.

Solution:

The issue here is that the user's form is missing the parent field on the form itself so that the auto assignment could take place.

Please ensure that your form has a field similar to the one below on it .

[cred_field field='@assignment_homework.parent' class='form-control' output='bootstrap' select_text='--- not set ---']

This support ticket is created 6 years, 4 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#1126452

We have two post types with a relationship setup. Assignments and homework submissions. On the assignments page, it lists homework submissions submitted for that assignment.

We have a submission form, setup properly. Until roughly around September 21st this was all working perfectly, however now when a homework submission is submitted it no longer assigns it to the assignment.

The link to the form (shown on the assignment page) is:

[cred_child_link_form form='295' parent_id='-1' text='Submit your Homework for this Assignment' target='_blank']

This was all working, then suddenly stopped.

#1126524

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dan,

Thank you for contacting our support forum.

Would you mind providing me with admin access to the site as well as a link to the page so that I can check on this for you ?

Thanks,
Shane

#1126542

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dan,

Could you send me a link to the page where i can see the issue ?

Meaning the page where this shortcode is placed.
[cred_child_link_form form='295' parent_id='-1' text='Submit your Homework for this Assignment' target='_blank']

Thanks,
Shane

#1126546

Hey Shane,

Sure:

This page lists assignments: /assignments/

Click on any assignment and it'll open the assignment, ex:

/assignment/put-your-resume-into-your-portfolio-due-oct-19th-2018/ (this is the page you asked for)

and the shortcode is within the content template:

/wp-admin/admin.php?page=ct-editor&ct_id=15&action=edit

the link above the table is the CRED link, the table below is another view (which lists assignments, but doesnt show the latest ones since the issue started)

and the page with the form is on page:

/submit-homework/

Cheers,
Dan

#1127576

Hi, Shane is on public holiday and will return tomorrow to continue assisting you. Thanks for your patience.

#1128279

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dan,

The issue was that this field was missing from your form.
[cred_field field='@assignment_homework.parent' class='form-control' output='bootstrap' select_text='--- not set ---']

This is what sets the parent assignment. I've added it to the form and it should now be working.

Please let me know if this helps.
Thanks,
Shane

#1128283

Hey Shane,

The idea behind this setup, with the shortcode is that it should automatically select the parent based on the Cred link on the parent post type page:

/submit-homework/?parent_assignment_id=816

I can see the form field is populated now with the correct parent, but can this field not be displayed to the user filling out the form and still work?

This was working previously then stopped after a plugin update.

Cheers,
Dan

#1128326

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dan,

What you can do is to wrap the field in a div and then hide that div with CSS.

Thanks,
Shane

#1128330

My issue is resolved now. Thank you!