• I have a radio button:
    [radio subject use_label_element default:get default:3 "Support" "Retur / Reklamation" "Kontakt"]

    if there is a get parameter it should use it, and if not it should use nr 3,
    that works fine until this part of the code is executed:

    if ( $matches = $tag->get_first_match_option( '/^default:([0-9_]+)$/' ) ) {
    	$defaults = array_merge( $defaults, explode( '_', $matches[1] ) );
    }

    That code overides the get-value, and merge in number 3 as well, so both are marked as checked in the html, and the browser only shoing the last one, nr 3, as selected.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter puggan

    (@puggan)

    As a workaround, I implemented:

    if(!$multiple) {
    	$defaults = array_slice($defaults, 0, 1);
    }
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thanks for reporting. This issue will be fixed in the next release of the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Checkbox default get and fallback’ is closed to new replies.