dbromfield Posted April 2, 2016 Report Share Posted April 2, 2016 I have a 'one to many' relational db with Student demographics in the (one) database and classes for each student in the other (many) database. I have a javascript routine that evaluates the current 'time' and assigns it a Period number (1, 2, etc). The routine runs fine and outputs its' result in a variable called 'pperiod' when run. I am trying to run this javascript above in the html block of the submission form datapage where there is a field named Period assigned to accept the value in 'pperiod'. The routine runs fine outside of Caspio, but no value is inserted in my form field when it is run from the html block in the form datapage. I am at my wits end! Thanks in advance. Quote Link to comment Share on other sites More sharing options...
svitlanataran Posted April 4, 2016 Report Share Posted April 4, 2016 Hi, I would recommend you inserting code in the footer instead of HTML block, also do not assign a value 'pperiod' for the field "Period". On the event "submit" you should call a function to calculate the value write it in the field "Period". Take a look at this example. I hope this helps. dbromfield 1 Quote Link to comment Share on other sites More sharing options...
dbromfield Posted April 4, 2016 Author Report Share Posted April 4, 2016 Hi, I would recommend you inserting code in the footer instead of HTML block, also do not assign a value 'pperiod' for the field "Period". On the event "submit" you should call a function to calculate the value write it in the field "Period". Take a look at this example. I hope this helps. Thank you very much !! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.