Skip to content

Commit

Permalink
Fixed issue #16706: Can't choose "No" option in "Slider initial value…
Browse files Browse the repository at this point in the history
… set at start" for "Multiple numerical input" - "Slider"
  • Loading branch information
olleharstedt committed Mar 5, 2021
1 parent d6d4cf3 commit 423487e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -91,7 +91,10 @@ public function __construct($aFieldArray, $bRenderDirect = false)
$this->sliderOptionsArray['slider_default_set'] = (bool) ($this->getQuestionAttribute('slider_default_set') && $this->sliderOptionsArray['slider_default'] !== '');

// Put the slider init to initial state (when no click is set or when 'reset')
if ($this->sliderOptionsArray['slider_default'] !== '') {
if (
$this->sliderOptionsArray['slider_default'] !== ''
&& $this->sliderOptionsArray['slider_default_set']
) {
$this->sliderOptionsArray['slider_position'] = $this->sliderOptionsArray['slider_default'];
} elseif ($this->getQuestionAttribute('slider_middlestart') == 1) {
$this->sliderOptionsArray['slider_position'] = intval(($this->sliderOptionsArray['slider_max'] + $this->sliderOptionsArray['slider_min']) / 2);
Expand Down

0 comments on commit 423487e

Please sign in to comment.