I see the code on the JS part of the form, but there is no effect.
Please note I also have changed the field from checkbox to select like this :
[cred_field field='pays' display='select' single_select='true' urlparam='pays_v' output='bootstrap']
But the code doesn't work either if it is a checkbox.
Thank you.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Roman,
The code actually works when it is a checkbox, i've changed the field type back to checkbox and if you take a look the field will auto select based on the url value.
hidden link
Please try again with that url.
Thanks,
Shane
In your example it's USA that is checked, but it should be Allemagne, since the offer's term is Allemagne, not USA !
You can verify this by checking the "offre" id in url parameter "id_offre", then check the taxonomy for this post id in backend.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Roman,
What was selected is actually correct and is done based what is the value of that checkbox field. See Screenshot.
USA has a value of 7 and Allemagne has a value of 11 and the parameter value that was passed is 7 not 11. If 11 was passed then Allemagne would be selected.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
If you were to change the value of the parameter to 11 for a test you will see that Allemagne will be selected.
Oh, in deed, thank you.
It seems it is because the shortcode that generates that number is wrong
[wpv-post-taxonomy type="pays" format="count"]
This count the number of terms instead of giving the term ID. How could I get the term ID with a shortcode ?
Thank you.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Roman,
You will need to create some custom shortcode to get the term id.
Could you send me a link to the page where this shortcode is used to generate the link ?
Thanks,
Shane