i have to mention that i want to save the date value in DCR (the generated xml file)!
Thanks, could you give me few examples on the best approach to have. I have datacapture.cfg and tpl file, the date should be saved in DCR. I already have a date value (perl script) in the tpl and i want to use the date value in the formApi which has to be auto generated. i can post that if you want to see the perl script:<iw_perl><![CDATA[ ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my $d = sprintf("%02d-%02d-%04d", $mday, $mon+1, $year+1900); ]]> </iw_perl>
...use Date::Format;my $d = time2str("%d-%m-%Y", time);...
...var now = new Date();var curr_date = d.getDate();var curr_month = d.getMonth() + 1;var curr_year = d.getFullYear();if (curr_date < 10) curr_date = "0" + curr_date;if (curr_month < 10) curr_month = "0" + curr_month;var d = curr_date + "-" + curr_month + "-" + curr_year;...
ghoti you are genious i must say. I have got formapi manual and developer manual which i will read. i have one more thing which i couldnt find anywhere, how do you set the date value into text item, like in this code smaple:is there any default value i can set if yes? then how?...<iw_perl> return date</iw_perl>...<item name="updatedate" pathid="updatedate" rowcontinue="f"> <label>Update Date</label> <text value="{iw_value name='$d' /}"/&t;</item>...
what do i need to do, as i read formapi document you cannot use inline command for <text> elements only callout script works with this element. and still i cant see how to set a default date into a input text field.
FormAPI Developer's Guide has nothing to do with inline - FormsPublisher Developers Guide is the manual to read - and note that inlines can be inserted pretty much anywhere within a DCT.