Date plus adding selected days |
5/28/2016 5:19:27 PM |
PHPRunner General questions | |
M
Mark Kramer author
I'm trying to add days to today's date using a drop down list and populate the due date field. I have it working with the code if I put a number in manually but not when I use the drop down list.. Please help <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=23880&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' /> Thank you |
|
![]() |
Sergey Kornilov admin 5/31/2016 |
Variable da2 is in fact not defined anywhere. If you define it somewhere it will fix the error but I don't see how do you use it except assigning a value to it. |
M
|
Mark Kramer author 5/31/2016 |
Variable da2 is in fact not defined anywhere. If you define it somewhere it will fix the error but I don't see how do you use it except assigning a value to it.
|
![]() |
Sergey Kornilov admin 6/1/2016 |
I'm sorry to say that is code is completely off. Some parts of it do make sense but it is not tied together. The whole if ... else ... part in func() function is a mess. No matter what you select in dropdown box da2 variable will always be 0 because of all those else sections. |
M
|
Mark Kramer author 6/1/2016 |
OK I got it to work by parsing the variable . I was getting string data instead of a number. Again a newbie error <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=79492&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> The only issue I'm having now is the calculated date is displayed but is not being saved when I add or edit the record..... Any thoughts? |