My drop down is conditionally hidden based on your tutorial. This all works great. However, when I add the beautify buttons, the form doesnt display correctly (just one long list)
I tried to get the container ID, and using your example previously of testing if it existed first before it applied the changes but this does not work, the only error says there is an "Uncaught SyntaxError: Unexpected token '.' " on the last row of the code below. Do you have any guidance you could maybe help me with?
Code: Select all
var btnPR = ("#s2id_Test-container");
if (btnPR !== null)
var field = new AppGiniField("Test");
var dropdown = field.dropdown();
dropdown.fix("pencil", "plus");
var btnAdd = dropdown.getAddButton();
if (btnAdd !== null) btnAdd.appendIcon("user").appendText(" New Test Reason");
var btnView = dropdown.getViewButton();
if (btnView !== null).appendText(" Edit");