Dear Sir/Madam,
Refer to ticket https://toolset.com/forums/topic/realtime-update-the-selection/, I was able to generate a json format and put it as options in cred_generic_field before, but now I do the same and not work
Here is the page to call the Views only
hidden link (data is correctly presented in json format)
Here is the code I put in post form, I insert the [wpv-view name="json-output-competition" cached="off"] as the option
[cred_generic_field type='select' field='this-competition-id']
{
"required":1,
"default":[],
"options":[[wpv-view name="json-output-competition" cached="off"]]
}
[/cred_generic_field]
<br/>[wpv-view name="json-output-competition" cached="off"]
Please visit the result from hidden link, I put the view code under the [cred_generic_field].
Here is the code for the view
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-item index=other]
{"value":"[wpv-post-id]","label":"[wpv-post-title]"},
[wpv-item index=last]
{"value":"[wpv-post-id]","label":"[wpv-post-title]"}
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
I did check the checkbox for Disable the wrapping DIV around the View, if I manually copy and paste the json data to the cred options, it work.
Please advise how I can fix it.
Best regards,
Kelvin.