Satis
New member
Hi there.
I'm trying to make an option section with 2 checkboxes.
The first checkbox is the main one and the second one is an child of the first one.
I'm using:
The admin template "option_template_MC_RTR" looks like this:
Once I click Save Option, I get this error:
Now I have been searching and reading a little here on XenForo forum, help page and the resource section, to try to figure out how the array default options needs to be done, and the only thing I found on this issue is this threat about it: Default value for data type array
But there is not much of help on it, since after what I can see on that page and on other options sections, the default value looks alright, but I'm still very new to making addon's for XenForo and I'm clearly missing something important.
So anyone that could point me in the right direction or explain how this would need to be setup in more dept, would be appreciated allot.
Kind regards
Satis
I'm trying to make an option section with 2 checkboxes.
The first checkbox is the main one and the second one is an child of the first one.
I'm using:
- Edit Format: Named Template
- Format Parameters: option_template_MC_RTR
- Data Type: Array
- Default Value: a:2:{b:0;b:0;}
- Array Sub-Options: adminNeedTested, noAdminSelfTesting
The admin template "option_template_MC_RTR" looks like this:
HTML:
<xen:checkboxunit label="">
<xen:option name="{$fieldPrefix}[{$preparedOption.option_id}][adminNeedTested]" label="{$preparedOption.title}" value="1"
selected="{$preparedOption.option_value.adminNeedTested}">
<xen:hint>{xen:phrase stopforumspam_enable_registration_check_explain}</xen:hint>
<xen:checkbox>
<xen:option name="noAdminSelfTesting" selected="{$preparedOption.option_value.noAdminSelfTesting}">
<xen:label>Test Label<!--{xen:phrase stopforumspam_moderate_registration_threshold}-->:</xen:label>
</xen:option>
</xen:checkbox>
</xen:option>
<xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
</xen:checkboxunit>
Once I click Save Option, I get this error:
Now I have been searching and reading a little here on XenForo forum, help page and the resource section, to try to figure out how the array default options needs to be done, and the only thing I found on this issue is this threat about it: Default value for data type array
But there is not much of help on it, since after what I can see on that page and on other options sections, the default value looks alright, but I'm still very new to making addon's for XenForo and I'm clearly missing something important.
So anyone that could point me in the right direction or explain how this would need to be setup in more dept, would be appreciated allot.
Kind regards
Satis