I built a CRED form where the user can select the author of the post too.
I Built it following the advices found here: https://toolset.com/forums/topic/cred-for-to-select-post-author/
The form was running very well since some days ago (unfortunately I can't be more specific, since just today we find it is no more running right ) but now it doesn't output anymore the select dropdown with the users.
So I have the view that list all the authors. It's named aux_list_author :
[wpv-layout-start][wpv-items-found]<!-- wpv-loop-start -->
<wpv-loop>[wpv-item index=1]{"value":"[wpv-user field="ID"]","label":"[wpv-user field="user_login"]"}[wpv-item index=other],{"value":"[wpv-user field="ID"]","label":"[wpv-user field="user_login"]"}</wpv-loop>
<!-- wpv-loop-end -->[/wpv-items-found][wpv-layout-end]
And the CRED form with the cred_generic_field in it
[cred_generic_field field="my_author_select" type="select" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[[wpv-view name="aux_list_author"]]
}
[/cred_generic_field]
As I said all was fine until some days ago, maybe a week or little more, but now the whole cred_generic_field doesn't output anything.
If I put the wpv-view shortcode on it's own in the CRED form (i.e. not inside the cred_generic_field ) I can see it's output, and apparentely it all right:
{"value":"10","label":"AduaWorkSpace"},{"value":"28","label":"almabc"},{"value":"24","label":"ariesep"},{"value":"19","label":"Businessinmotion"},{"value":"29","label":"Cheren"},{"value":"18","label":"cogesta"},{"value":"25","label":"darsena"},{"value":"16","label":"dimora"},{"value":"27","label":"ermelinda"},{"value":"22","label":"europa-coworking"},{"value":"32","label":"eurtc"},{"value":"33","label":"executive_monti"},{"value":"21","label":"getanoffice"},{"value":"20","label":"marconiwo"},{"value":"8","label":"mbcenter"},{"value":"34","label":"neaservice"},{"value":"13","label":"omicron"},{"value":"9","label":"parcodemedici"},{"value":"31","label":"polaris"},{"value":"12","label":"salario-office"},{"value":"35","label":"segreterie-virtuali"},{"value":"17","label":"simal"},{"value":"26","label":"tiempona"},{"value":"11","label":"TiempoRoma"},{"value":"15","label":"trade-ge"},{"value":"23","label":"veryoffice"},{"value":"14","label":"worldservice-mi"}
I investigated some more and took a look at the html source of the CRED form, and I found that the output of [wpv-view name="aux_list_author"] is surronded by and aditional div that contains an input too:
<div id="wpv-view-layout-1229-CPID53" class="js-wpv-view-layout js-wpv-layout-responsive" data-viewnumber="1229-CPID53" data-pagination="{"ajax":"false","effect":"fade","duration":500,"stop_rollover":"false","cache_pages":true,"preload_pages":true,"pre_reach":1,"spinner":"default","spinner_image":"<em><u>hidden link</u></em>","callback_next":"","max_pages":1,"page":1}">
<input type="hidden" id="js-wpv-pagination-page-permalink" value="/inserisci-sede/?wpv_view_count=1229-CPID53&wpv_paged=1" />
{"value":"10","label":"AduaWorkSpace"},{"value":"28","label":"almabc"},{"value":"24","label":"ariesep"},{"value":"19","label":"Businessinmotion"},{"value":"29","label":"Cheren"},{"value":"18","label":"cogesta"},{"value":"25","label":"darsena"},{"value":"16","label":"dimora"},{"value":"27","label":"ermelinda"},{"value":"22","label":"europa-coworking"},{"value":"32","label":"eurtc"},{"value":"33","label":"executive_monti"},{"value":"21","label":"getanoffice"},{"value":"20","label":"marconiwo"},{"value":"8","label":"mbcenter"},{"value":"34","label":"neaservice"},{"value":"13","label":"omicron"},{"value":"9","label":"parcodemedici"},{"value":"31","label":"polaris"},{"value":"12","label":"salario-office"},{"value":"35","label":"segreterie-virtuali"},{"value":"17","label":"simal"},{"value":"26","label":"tiempona"},{"value":"11","label":"TiempoRoma"},{"value":"15","label":"trade-ge"},{"value":"23","label":"veryoffice"},{"value":"14","label":"worldservice-mi"}
</div>
So I think that maybe the cred_generic_field "crashes" when it finds inside it's options the div and the input and not only the value:label items, isn't it?
Could it be a bug introduced in a recent Views' update? or am I doing something wrong?
Could you please help me?
Stefano