Hi lenglemetz,
to do this you will need to create a custom type in a function/plugin file
add_action( ‘wpcf7_init’, ‘wpcf7_add_shortcode_drop’ );
then create a function which creates the shortcode
**
* Add cf7 shortcode builder callup function
*/
function wpcf7_add_shortcode_drop() {
wpcf7_add_shortcode( ‘drop’, ‘wpcf7_drop_shortcode_handler’, true );
}
finally you can create the function which generates the dropdown in html
function wpcf7_hide_shortcode_handler( $tag ) {
$tag = new WPCF7_Shortcode( $tag );
$id = get_the_ID();
$location = get_the_title();
$html = ‘<select required=”required” class=”form-control form-select required” id=”edit-submitted-besoin” name=”submitted[besoin]”>
<option value=”” selected=”selected”>– Choisir –</option>
<optgroup label=”Assurances de personnes”>
<option value=”Mutuelle sante”>Mutuelle santé</option>
<option value=”Prevoyance”>Prévoyance</option>
<option value=”Dependance”>Dépendance</option>
<option value=”Obseques”>Obsèques</option>
<option value=”Assurance Vie”>Assurance Vie</option>
</optgroup>
…
</select>’;
return $html;
}
this should help get you going, I cut and pasted part of the menu you wish to recreate, obviously you will need to get this data dynamically.