XF 2.2 Create an option without showing it on the admin options page

michael.s

Member
Is there a way to create an option that will be used to store an internal API key that the user doesn't need to see at all, even not with the "Show advanced option" ?
I've tried it with a custom callback which returns an empty string, but that's showing an error because of the following template code:

Code:
        <xf:if is="$includeHtml is empty">
            <xf:formrow rowclass="{$rowClass}">
                <div class="blockMessage blockMessage--error blockMessage--iconic">
                    DEBUG: {{ $option.getDisplayCallbackError() }}
                    {$hintHtml}
                </div>
            </xf:formrow>
        <xf:else />

To avoid the error, I'm returning now "&nbsp", but that looks horrible since it's still inserting the empty row on the options page.

If there's no way to hide it, what's the best alternative for this? Is there some other persistent data storage available in XF or do I have to create my own table to store the key?
 
You can create a new option group which is only displayed in debug mode (or use the existing debug option group) and add the option to that group.
 
Top Bottom