Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Chekbox and radiobox not working correctly

$
0
0

Replies: 0

Hi,
I’am try to build this registration formular :
1) Checkbox “city”: Witch city did you visit?
Values (“Paris”, “London”, “Berlin”)
2) Radiobox “enjoy-paris”: Did you enjoyed Paris? (Yes/No)
mandatory, default “yes”, displayed only when city contains “Paris”
3) Text “why-not-paris” : Why?
mandatory, displayed only when enjoy-paris equals No

My tests (WordPress 4.9.5 – Twenty Sixteen – Ultimate Member V2.0.13)

1) if i check “Paris”, “No” to Enjoy? and i dont answer to Why?, i have this error: Warning: strstr() expects parameter 1 to be string, array given in wp-content/plugins/ultimate-member/includes/core/um-actions-form.php on line 378

Here is my correction:
old: if ( ! strstr( $cond_value, $parent_value ) ) {
new: if ( ! strstr( $cond_value[0], $parent_value ) ) {

2) After that, i make the same test and the registration fails because the field Why? is empty. That’s Ok but as the form is reloaded, fields City (Paris) and Enjoy? (No) are correctly displayed while the field Why? remain masked (and the warning not visible).


Viewing all articles
Browse latest Browse all 59525

Trending Articles