Archive

setup.xml bool field "checked/unchecked"

Ultra Champion

I have a setup screen for my application which allows the users to choose to enable/disable the index my application uses.

<input field="disabled">
  <label>Disable My Index</label>
  <type>bool</type>
</input>

Since my default/index.conf contains disabled=true when the setup page is rendered the tickbox is checked by default.
Is there a way to override the setup UI to disregard the effective result of the conf files such that it displays "unchecked"?

In an ideal world I would like to keep disabled=true in the default/index.conf (as required for app Certification) but the default option during setup to effectively enable the index?

This question also extends to inputs:
I would like my default/inputs.conf to have disabled=true, but the setup UI to have disabled=false as the default action.
Am I overlooking something obvious?

0 Karma
1 Solution

SplunkTrust
SplunkTrust

The general rule of thumb is to allow the user to specifically enable what they want and leave whatever they like disabled.

I wouldnt override this behavior because it should always be the users choice even if that involves possibly mis-configuring the app.

Instead I would put notes explaining why they SHOULD enable it regardless of their preconceived notions.

View solution in original post

0 Karma

SplunkTrust
SplunkTrust

The general rule of thumb is to allow the user to specifically enable what they want and leave whatever they like disabled.

I wouldnt override this behavior because it should always be the users choice even if that involves possibly mis-configuring the app.

Instead I would put notes explaining why they SHOULD enable it regardless of their preconceived notions.

View solution in original post

0 Karma

Ultra Champion

To a degree I guess it comes down to semantics - when the app is installed the various options are disabled. The setup screen is the users chance to easily enable the features necessary for the app to work.

I appricate that good Ux and security do not always go hand in hand, thus:
"Technical control" beats "flowers and butterflys!"

Thanks for your comment - I had already made the descriptions more "persuasive" but I think I am in agreement.

0 Karma

SplunkTrust
SplunkTrust

Another option may be to leave it blank in your default conf file... and use javascript to check it in setup.xml

0 Karma

SplunkTrust
SplunkTrust

Something like this should work if you put it in the <text> field

          <![CDATA[
          <script language="javascript">
              $(document).ready(function() {
                 $("#yourCheckboxFieldName").val( current_value ).attr('selected',true);
              });
          </script>
          ]]>

SplunkTrust
SplunkTrust

@nickhillscpl wanted to be sure you see the js i left ...

0 Karma

Ultra Champion

ji @jkat54 - yes thanks. I might give it a spin

0 Karma