Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
hi, simple way is use section visibility control, but you do not want to create another section. So, you will need to consider the script way. Below is for your reference. You can use in Custom Html element.
<script> $(document).ready(function(){ var $checkbox = FormUtil.getField("concluded"); $($checkbox).on("change", function(){ var value = FormUtil.getValue("concluded"); if (value === "yes") { FormUtil.getField("concludedby").val("#currentUser.username?javascript#"); FormUtil.getField("concludedon").val("#date.yyyy-MM-dd HH:mm:ss?javascript#"); } else { FormUtil.getField("concludedby").val(""); FormUtil.getField("concludedon").val(""); } }) }); </script>
I am using Javascript API, Hash Variable & jquery in my sample script.
Hello panda,
I'm not a programmer but your solution definitely helped me reach my goal! Thanks a lot!
Hello,
I have a form with four columns: task, concluded, concluded by and concluded on.
Considering that the concluded field is a checkbox, I want a user to tick the field every time he/she finishes a task. After that, I want the two remaining fields (concluded by and concluded on) to automatically retrieve a value, in this case, the username and the time, respectively. Is it possible?
Have in mind that the automatic values can only appear when the checkbox is selected. Also, I want to know if there's other alternative rather than creating a new section, because it will damage other formats and definitions I have in place.
Thank you for your attention.