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.
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']
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']
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)
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.
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.