Skip Navigation

[Resolved] Likert Scale in Toolset Forms?

This support ticket is created 3 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.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Author
Posts
#1868175

Hey Team,

I want to use survey inputs as custom fields for a CPT. I have created all the remailing fields but I don't have a way to create a Likert style scale using generic fields. I tried to use RFGs but they are not visible on the CPT publishing form. Based on some research on your site, it seems like RFGs have to be entered on a separate form as Toolset treats an RFG as a child post to the CPT. This creates suboptimal user experience as they would need to submit two forms. I want to confirm if this is still true? If yes, what is the most convenient want to add a Likert style survey form with custom fields with rest of the custom fields or without rest of the custom fields?

My exact scenario: I have created a "endorsement" CPT. The person endorsing will give an endorsee a rating for each that needs to be endorsed. So I would need two fields: 1) Skill and, 2) Rating on a 5 point scale.

Skill should be populated from the parent CPT "endorsement request", which is in a O2O relationship with "endorsement" CPT. Basically, I want the endorser to enter rating on a five point scale for each taxonomy term (skill category) associated with the parent post ("endorsement request").

#1868573

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Your understanding of the repeating field group fields is correct and they can't be entered in the same form as the parent post type. However, even if this was possible, it won't be useful for your case, since you need the skills to be linked with the parent post's taxonomy terms.

The main challenge is to link the skills in the child form with the terms attached to the parent post, for which there is no built-in way and this will require fairly complex customization.

For example, through a view or custom code, you'll need to first get the ID of the related parent post and then its attached skills taxonomy terms. Once you have them, you'll cycle through each one to generate a generic field in the form for the input of the respective rating.

Here are some of the functions and shortcode that will prove useful:

https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts
https://developer.wordpress.org/reference/functions/get_the_terms/
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_generic_field

For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1869041

Hi Waqar,

Thanks for sharing the resources. The use of generic fields makes sense but can I create a Likert style scale with generic fields? I want the users to select ratings on a visual scale, not a drop down.

#1870015

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

The generic fields are not limited to select/drop-down type and you can also set them to be a radio button type, which would make the most sense for a Likert style scale.

Once you have the options available as radio buttons, the rest is just the styling which can be controlled through custom CSS code.

#1870497

Thanks, Waqar.

#1870501

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.