Skip Navigation

[Assigned] Create “Alumno” and “Memoria” in two steps with 2 forms

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.

This topic contains 2 replies, has 1 voice.

Last updated by Miguel 17 hours, 5 minutes ago.

Assisted by: Christopher Amirian.

Author
Posts
#2832383

Tell us what you are trying to do?
The goal is to allow the user to create a Alumnos (students) and a Memoria (Memory) in two steps (without PHP code for creation), ensuring that the Memory is automatically linked to the newly created Student and inherits the "Camada" (graduation year) Taxonomy.

Alumnos CPT is related with Memorias CPT as one-to-many and both shared the "Camada" taxonomy.

I've created an input form with Alumnos including de camada taxonomy

My idea is that upon submission of this form, it redirects to the page containing the "Memoria" creation form, and this form passes the parameters to link it to the Alumno and Camada.

However, I couldn't find a way to do this using the form editor.

What is the link to your site?
hidden link

Page with Alumnos Form:
hidden link
hidden link

Thank you

me

#2832472

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support, If you want to achieve this, Submit Alumno ➜ land on that Alumno’s single page ➜ show a Memoria form there that is already linked to this Alumno and pre-filled with the Alumno’s Camada.

Then you need to do as follows:

Step 1 — Alumno form

Build a normal post form for Alumno and include the Camada taxonomy field.

Step 2 — After submit action

In the Alumno form Settings → After visitors submit this form, choose Go to the post (i.e., the newly created Alumno single).

Step 3 — Put the Memoria form on the Alumno single template

Edit the single-Alumno (or its Content Template) and insert the Memoria create form on that page.

Step 4 — Auto-link the parent (Alumno)

In the Memoria form, include the relationship/parent field (e.g. @alumno-memoria.parent) and set it to use the current post as the parent.

For more information:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

https://toolset.com/forums/topic/set-relationship-field-default-value-to-current-post/

Step 5 — Pre-fill Camada on the Memoria form from the current Alumno

Add the Camada taxonomy field to the Memoria form and set its default from a shortcode that reads the current page’s term (the Alumno page you’re on). For example, set default to the term slug via:

[wpv-post-taxonomy type="camada" format="slug" item="$current_page"]

https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/

Now, the User creates Alumno → WordPress opens the new Alumno page → the Memoria form on that page already knows the parent Alumno and has Camada pre-selected to match the Alumno’s Camada.

Thanks.

#2832572

Here is a screen recording with the problem that I found with the taxonomy field in a form.

hidden link

thanks