Material Design overrides select form element from CF7 preselected with JS
-
Hi, we are prefilling a Contact Form 7 form from local storage with javascript which works, but after using the Material Design shortcodes the selection is gone.
I can see the right selection for a short time until MD is initialized.
I tried
$("myselect").find("option[value='test']").prop('selected', 'selected');
and also
$("myselect").val('test');
but it seems selecting the form elements with JS in general does not work that way.What is the best way to preselect a CF7-formelement that it works with Material Design?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Material Design overrides select form element from CF7 preselected with JS’ is closed to new replies.