Closed mikerockett closed 9 years ago
You have to ckeck it.
In which context is this @mike-anthony ? Are you talking about the Inputfield settings or are you referring to the ConfigurableModules which are static ?
I do think there's some weirdness going on.
// could you try it this way?
$field = $this->modules->get('InputfieldCheckbox');
$field->attr('name', 'fname');
$field->attr('autocheck', 1);
$field->attr('uncheckedValue', 0);
$field->attr('checkedValue', 1);
$field->attr('value', $this->fname);
I've just moved over to the new ModuleConfig.
Even if I force the value, it doesn't seem to work. But I'll try your method.
Seems that the value isn't being sent back to the ModuleConfig class.
The field (in my case: $this->experimentEnhancedPathCleaning
) is NULL
.
Update: Sorry, I see it's not meant to do that anyway... So setting the value manually wouldn't work for any field - ModuleConfig is just not doing it right.
In my module, these two fields don't fetch the actual, saved value, but everything else does.
Just checked the output markup, it seems that the value
attribute is being set, not the checked
attribute.
I must apologise - I didn't realise that autocheck
really was needed here. That said, I think it should be handled by ModuleConfig automatically. Or, at the very least, should be mentioned in the page discussing ModuleConfig.
If I check one and save, it remains unchecked. However, the field does save.
Using PW 2.5.13.