Hey guys, I recently purchased Toolset and really love it!
I am currently trying to build a frontend solution for production managers in the field of audio postproduction.
There are "projects" that can be created by the managers only in the frontend.
I have built a project template and an editable Form that contains information about the project, technical information and deadlines. This all works wonderfully.
However, there is also a "character list" (repeatable Field Group) in which the project managers can enter characters, cue numbers, actors and their booking status. I used a repeatable field group for this and embedded it in the template via a view module.
The manager should be able to edit the individual lines and add new ones. However, in my current settings, the Production Manager always has to select the project in the Edit Form view, which is not feasible for us because there are other projects from other managers that the Production Manager is not allowed to select. Also, the Edit Form link always leads to the current project, so selecting the Project again would be a double confirmation.
The same applies to the "Add New" link. Again, the manager is forced to select the project. This makes no sense, since he is editing the current project.
In addition, after confirming via the Submit button, the user should be taken back to the previously edited project. However, this selection is not available.
For further Demonstration I added some Images.
Is there any documentation that you are following?
Yes - there are multiple ways you can assign parent.
You can add a Generic hidden field to your form that will hold the parent post ID and later use the hook "cred_save_data" to connect the repeating field group post you edit to it's associated parent ID.
In that case you should remove the existing parent post select dropdown from your form and add a generic hidden field that will hold the parent post ID.
For example:
- Add generic field to your form and remove the existing one.
thanks again for your detailed reply with a poweful Solution.
However, I have decided to hide the field via CSS:
display:none;
as it currently looks like I cannot select any other project at all.
What about the link back to the project?
Does the button support
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
a link back to the current project?
One more thing:
How does it work if I want to add a new "record" (new line to characterlist) but want the field below the loop/portal, as I don't want a link to the new character creation in every line? (See 2646033-Toolset_Projectsamples.png)
What about the link back to the project?
Does the button support
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
a link back to the current project?
==>
You can use the Toolset form's hook "cred_success_redirect" to redirect user to your desired parent page. If parent page is dynamic, as shared before you can add generic hidden field that should hold parent post ID and later you can catch the parent post ID within "cred_success_redirect" using $_POST and get the URL of that parent post ID and redirect to that URL.
One more thing:
How does it work if I want to add a new "record" (new line to characterlist) but want the field below the loop/portal, as I don't want a link to the new character creation in every line? (See 2646033-Toolset_Projectsamples.png)
===>
Lets say you are on "listing page" where you display all post list, then, You can create a new page for instance "create new record" and add your post form to create new post you created to this page and then add a link to this page "create new record" so when user click on this link user will be redirected to the page "create new record" where user fill the form and submit and when user submit the form from the form settings "After visitor submit the form" section you can chose the listing page where you display all records.
For example:
- Add generic field to your form and remove the existing one.
generic_field type='hidden' field='parent_post_id']
{
"default":"[wpv-search-term param='parent_id']"
}
[/cred_generic_field]
Where:
- Replace the URL param 'parent_id' with your original URL param.
=>
how do I get the 'parent_id' ?
You can use the Toolset form's hook "cred_success_redirect" to redirect user to your desired parent page. If parent page is dynamic, as shared before you can add generic hidden field that should hold parent post ID and later you can catch the parent post ID within "cred_success_redirect" using $_POST and get the URL of that parent post ID and redirect to that URL.
Sorry but I cannot recreate what you are referring to. Can you maybe give me a step by step walkthrough?
Maybe I am a bit too limited in my database thinking, but in e.g. Filemaker I need a relationship between two databases to access a $Parent_ID with a $fk_Parent_ID. Currently, however, no relationship or relationship Forms are set in Toolset.
Lets say you are on "listing page" where you display all post list, then, You can create a new page for instance "create new record" and add your post form to create new post you created to this page and then add a link to this page "create new record" so when user click on this link user will be redirected to the page "create new record" where user fill the form and submit and when user submit the form from the form settings "After visitor submit the form" section you can chose the listing page where you display all records.
===>
I do not want to create a new post/project, but create a new row within the post/project for the repeatable field group "Characterlist", which is displayed via a view module within the post/project.
The problem is that the button/label text for this should not be displayed within the characterlist loop (portal that shows all "related Records of Characterlist"), but below the loop. When I try to use the button/label text as in https://toolset.com/course-lesson/front-end-forms-for-editing-content/
the edit form is not displayed outside the loop, but inside it is. However, I don't want to have an "add new Character" button/label text in every line, but only one below or above the loop.
Sorry for the long messages and that I can't quite follow your thoughts. Maybe you overestimate my web design and toolset knowledge 😉
it was just example to get 'parent_id' - you can take the name of your URL param that holds the parent ID or assign the existing value of your parent dropdown ID.
If you can share admin access details and problem URL I will be able to guide you in the right direction. If you want a sandbox site where you can replicate your functionality and your site flow then let me know I will offer you a brand new sandbox site where you can setup your requirement and then I will be able to guide you in the right direction.
*** 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 have set the next reply to private which means only you and I have access to it.
The topic ‘[Closed] Modify Repeatable Group behaviour’ is closed to new replies.