Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi... i'm new in using Joget :)
Yesterday I've tried to create a form with the addition of the Custom HTML. I use the Custom HTML to initialize the input date. But the code I made does not give any effect (input date field is not filled by the system date), but the alert show me the system date. The following is the code that I enter into the custom HTML :
<script language="JavaScript" type="text/javascript"> $(function() { $('document').ready(function() { var currentTime = new Date(); var month = new Array(12); month[0]="Jan"; month[1]="Feb"; month[2]="Mar"; month[3]="Apr"; month[4]="May"; month[5]="Jun"; month[6]="Jul"; month[7]="Aug"; month[8]="Sep"; month[9]="Oct"; month[10]="Nov"; month[11]="Dec"; var monthName = month[currentTime.getMonth()]; var day = currentTime.getDate(); var year = currentTime.getFullYear(); $("input[name=inputDate]").attr("value",day+'-'+monthName+'-'+year); alert($("input[name=inputDate]").val()); }); }); </script>
Any suggestions how to initialize some input fields?
2 Comments
Tiensoon
Please try using the formbuilderOnReady() JavaScript function instead of the jQuery document ready. Such as:
formbuilderOnReady() is a specialized function introduced into Joget Workflow, which will be called when the form is fully rendered by Form Builder.
Siyam Junianto
thx Tiensoon,... it's work!