Hi @nick405060,
I encoutered something similar to this. If you inspect the HTML generated by your XML you will realise where the problem lies.
To solve I assigned an id to panel and then through javascript I added the button as follows:
XML:
<panel id="mypanel">
<html depends="$alwaysHideCSSPanel$">
<style>
#submit_button .btn-pill{
background-repeat: repeat-x;
background-color: #61a637;
color: #ffa;
text-shadow: none;
text-decoration: none;
border-radius: 4px;
}
#submit_button .btn-pill.active{
background-color: rgba(100,255,100,.05) !important;
text-decoration: none !important;
color: #500 !important;
border-radius: 4px !important;
}
</style>
</html>
<input type="text" token="networkIdOnChange" searchWhenChanged="false">
<label>NetworkID:</label>
<default></default>
</input>
<input type="text" token="networkid" depends="$justHideMe$" searchWhenChanged="false">
<default>$networkIdOnChange$</default>
</input>
</panel>
JavaScript:
require([
"jquery",
"splunkjs/mvc/simplexml/ready!"
], function ($,mvc) {
$("#mypanel > div > div").append('<div class="input"><label> </label><div class="splunk-view"><button class="btn" id="submit_button">Submit</button></div></div>')
});
Hope this helps,
Harsh
... View more