Skip Navigation

[Resolved] Generic field populated by a View doesn't work

This support ticket is created 4 years, 2 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 – 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1786199

Hi, I've added a cred_generic_field populated by a View. This is the output of my view (I set 'Disable the wrapping DIV around the View'):

{"value": "1359", "label": "Anxiety"},{"value": "1875", "label": "Constipation"},{"value": "9634", "label": "Diarrhea"},{"value": "1361", "label": "Dizziness"},{"value": "1877", "label": "Drowsiness"},{"value": "10469", "label": "Dry Mouth"},{"value": "1878", "label": "Headache"},{"value": "10725", "label": "Heart Burn"},{"value": "10474", "label": "Heart Palpitations"},{"value": "10472", "label": "Indigestion"},{"value": "1879", "label": "Insomnia"},{"value": "1360", "label": "Nausea"},{"value": "1876", "label": "Skin Rash"},{"value": "11394", "label": "Upset Stomach"}

This is the cred_generic_field on the form:

[cred_generic_field type='checkboxes' field='item-id']
{
"required":0,
"options":[ [wpv-view name="view-checkboxes"] ]
}
[/cred_generic_field] 

The form output of the cred_generic_field is blank. I've tried adding directly the JSON in this way:

[cred_generic_field type='checkboxes' field='item-id']
{
"required":0,
"options":[ {"value": "1359", "label": "Anxiety"},{"value": "1875", "label": "Constipation"},{"value": "9634", "label": "Diarrhea"},{"value": "1361", "label": "Dizziness"},{"value": "1877", "label": "Drowsiness"},{"value": "10469", "label": "Dry Mouth"},{"value": "1878", "label": "Headache"},{"value": "10725", "label": "Heart Burn"},{"value": "10474", "label": "Heart Palpitations"},{"value": "10472", "label": "Indigestion"},{"value": "1879", "label": "Insomnia"},{"value": "1360", "label": "Nausea"},{"value": "1876", "label": "Skin Rash"},{"value": "11394", "label": "Upset Stomach"} ]
}
[/cred_generic_field] 

It worked fine.

For some reason the view is breaking the cred_generic_field. I've tested deactivating all the plugins, all the custom php and I switched to default theme, but I still get the problem when I use the view to populate the cred_generic_field.

Any idea?

#1787323

Hello,

Thanks for the details, I can duplicate the same problem in my localhost, and have escalated this issue, will update here if there is any news.

#1807823

It is fixed in next version of Toolset Views plugin 3.3.2, which is in QA status, will be released soon.
Currently, you can try the hot fix in below erratum:
https://toolset.com/errata/using-a-view-with-json-output-to-populate-generic-select-field-in-a-form-not-working/

#1818481

Toolset Views plugin 3.3.2 is released, you can download it here:
https://toolset.com/account/downloads/#legacy-plugins

Please test it and feedback if the problem is fixed, thanks