Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By ToddD513
#16869
When you put a date field on a dynaform. One of the selections under behavior is to default the field to "TODAY". However, every day it defaults to the date the field was created on the form instead of "TODAY". When you open the calendar the text is blue for today but the selected date is not today in the box. Anyone else have this issue? Every date field I create does this. I have not changed any of the default settings execept for the field is required and the default is "Today".
User avatar
By liliana
#16875
Hi ToddD513,

In which version of ProcessMaker did this happen to you?, I've tested it on version 2.0.32 and I don't have any problems. I recommend you to check the xml code that generates. If you created some date and you don't change the devault values the xml code will be like follows:

type="date" relativedate="1" beforedate="0m" afterdate="1y" mask="%Y-%m-%d" editable="0" required="0" readonly="0" showtime="0" defaultvalue_sel="today" defaultvalue="today" mode="edit" btn_cancel="Cancel"

I you have the same problems maybe you can pass me the xml code of your date field to check.

Regards.
By muthuki
#16901
hi liliana,

am very new in this, i want the payment due date to be +7 days from the payment request date. here is my xml

<pr_dr type="date" relativedate="1" beforedate="0m" afterdate="1y" mask="%Y-%m-%d" editable="0" required="1" readonly="0" showtime="0" defaultvalue_sel="today" defaultvalue="today" mode="edit" btn_cancel="Cancel">
<en>Payment Request Date</en>
</pr_dr>
<pd_date type="date" relativedate="1" beforedate="0m" afterdate="1y" mask="%Y-%m-%d" editable="0" required="1" readonly="0" showtime="0" defaultvalue_sel="today" mode="edit" btn_cancel="Cancel" startdate="" startdate_isodate="" enddate="" enddate_isodate="" defaultvalue="today" defaultvalue_isodate="" hint="" savelabel="0">
<en>Payment Due Date</en>

thanks
By ToddD513
#17739
Figured out a workaround. When you select in the dropdown the default_sel = "today" but the default get set to the day your selected in "default" out of the dropdown. Every time I save the dropdown choice or change it the default field gets reset to the day I changed the dropdown.

-this is what happens when you change the dropdown to default.
<AOSDATE type="date" relativedate="1" beforedate="-4m" afterdate="1y" mask="%m-%d-%Y" editable="0" required="1" readonly="0" showtime="0" defaultvalue_sel="today" defaultvalue="2011-12-14" mode="edit" btn_cancel="Cancel" startdate="" enddate="" hint="" savelabel="0">

-if I go into the xml and change the value of "defaultvalue to "today" it works fine as long as I don't go back and change anything in the settings for the field.
<AOSDATE type="date" relativedate="1" beforedate="-4m" afterdate="1y" mask="%m-%d-%Y" editable="0" required="1" readonly="0" showtime="0" defaultvalue_sel="today" defaultvalue="today" mode="edit" btn_cancel="Cancel" startdate="" enddate="" hint="" savelabel="0">
By eventoteam
#790853
Hi,
I'm using processmaker v1.2 and having issue to set the Current Date time by default.
I have also Tried the above Code but it doesn't seem to work for me.Can you Help me out how to fix this Issue.

Here is my code:
<dtlevel1Personassignon type="date" startdate="1986-07-09" enddate="2055-07-09" mask ="%Y-%m-%d" required="0" readonly="0" size="15" mode="edit" beforedate="" afterdate="" dependentfields="" defaultvalue="" defaultvalue_sel="today" savelabel="0" relativedate="" editable="0" sowtime="1" hint="" btn_cancel="Cancel">
<en> level 1 Assigned on </en>
</dtlevel1Personassignon>
User avatar
By amosbatto
#790858
Version 1.2??? Wow, its been 6 years since I last saw version 1.2. Glad to know that there are still people using ProcessMaker for that long ago!

You can create a trigger, which is set to execute before the DynaForm with the following code:
Code: Select all
@@dtlevel1Personassignon = getCurrentDate(); 
User avatar
By amosbatto
#790906
Use this trigger code:
Code: Select all
@@dtlevel1Personassignon = date("Y-m-d");
@@dtlevel1Personassignon_label = date("Y-m-d");
Make sure to turn on Debug Mode, to make sure that the variables are set when your DynaForm is displayed.
By eventoteam
#790984
As i was using the Field in Grid Layout. The following code Sets the default date to it.

@=Level1InvestigationNotes['1']['dtLevel1PersoneAssignedon'] = date("Y-m-d");

I would also like to know:What-if I pickup any other Date from Calendar, so how can that can be reflected in dtLevel1PersoneAssignedon.
User avatar
By amosbatto
#791499
In the trigger you can loop through the grid and set all the date fields to the same date.
Code: Select all
if (isset(@=Level1InvestigationNotes) and is_array(@=Level1InvestigationNotes)) {
   for ($i =1; $i <= count(@=Level1InvestigationNotes); $i++) {
      @=Level1InvestigationNotes[$i]['dtLevel1PersoneAssignedon'] = date("Y-m-d");
   }
}
If you want to set the default date when the user creates a new row in the grid, you need to use JavaScript. See:
http://wiki.processmaker.com/index.php/ ... dRow.28.29

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]