Skip Navigation

[Resolved] dropdown/select not populating, json is valid

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

Our next available supporter will start replying to tickets in about 5.12 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Shane 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2071123

I am created a dropdown in a form, populated by a cpt.

Have created a view of a cpt and output as json.

If I add the view, in options of a generic select, nothing is output

[cred_generic_field field="student-id" type="select" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"",
"options":[[wpv-view name="student-list-dropdown"]]
}
[/cred_generic_field]

If I copy and paste the output into options (so options are hardcoded), then it outputs fine?

#2071255

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

Thank you for getting in touch.

I suspect that this is because you dont have the option "Disable the wrapping DIV around the View" checked on your view.

Go back to your view and ensure that this is checked. This will remove the wrapping outer divs in your view to ensure that only the JSON output is being produced.

Thanks,
Shane

#2072769

Thanks for this 🙂

I have ticked the box on the views, but the dropdowns are still blank 🙁

Is there anything else worth trying?

#2072805

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

I will perhaps need to look at the site itself.

Would you mind allowing me to have admin access to the site ? I will need a link to the front end for the form as well as the link for the view on the backend.

I've enabled the private fields for your next response.

Thanks,
Shane

#2073695

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

Thank you for the continued Patience. This should now be working.

Thanks,
Shane

#2076127

Thanks for that Shane. What was the issue?
Cheers,
Terry.

#2076159

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

I cant be sure exactly however what resolved the issue is where I placed the closed bracket in a separate line like below.

[cred_generic_field field="student-id" type="select" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"",
"options":[[wpv-view name="student-list-dropdown"]
]
}
[/cred_generic_field]

Thanks,
Shane