diff --git a/wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module b/wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module index 69011347..1c3f8802 100644 --- a/wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module +++ b/wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module @@ -10,7 +10,8 @@ * @property bool $header Whether or not button will also appear in header (default=false). * @property bool $secondary Whether or not button is secondary (default=false). * @property bool $small Whether or not button should be small, where supported (default=false). - * @property string $dropdownInputName #pw-internal + * @property string $dropdownInputName Name of input to receive selected dropdown value (default='_action_value') #pw-internal + * @property bool $dropdownSubmit Selected dropdown value becomes submit value? (default=true) #pw-internal * */ class InputfieldSubmit extends Inputfield { @@ -55,6 +56,10 @@ class InputfieldSubmit extends Inputfield { // name of 'hidden' input that will receive the clicked dropdown item value $this->set('dropdownInputName', '_action_value'); + + // Selected dropdown value becomes submit value? If set to false, then only the + // dropdownInputName above will contain the selected value + $this->set('dropdownSubmit', true); } public function set($key, $value) { @@ -209,8 +214,11 @@ class InputfieldSubmit extends Inputfield { if($numValues) { // there are values that can be populated to a hidden input $inputID = $dropdownID . '_value'; - $out = "" . - str_replace("