Skip to content

Commit

Permalink
Update custom_ROToolbox.js
Browse files Browse the repository at this point in the history
Added a new @hidden tag, which hides the prompt which follows it. Combine this with a List prompt with a default value to create a hidden input value on the form.
  • Loading branch information
doyle-johnpaul committed Apr 15, 2021
1 parent 5862777 commit 7eb2c9a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_ROToolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ function transformRO() {
});
$("p:contains('@Layout')").parent().parent().each(function() {
applyLayoutTemplate("@Layout", $(this))
});
$("p:contains('@Hidden')").parent().parent().each(function() {
hidePrompt("@Hidden", $(this))
});
app.lib.mask.remove();
app.events.publish('ROToolboxDone');
Expand Down Expand Up @@ -310,6 +313,12 @@ function recompAngularElement(recompEle) {
}
}

function hidePrompt(tag, tagElement) {
var target = tagElement.next();
$(target).hide();
tagElement.remove();
}

function addInformation(tag, tagElement) {
var userDefined = parseOptions(tag, tagElement);
if (!userDefined.info && !userDefined.icon) {
Expand Down

0 comments on commit 7eb2c9a

Please sign in to comment.