3 * The page shown when the user requests a new form
6 include_once("../../globals.php");
7 include_once("$srcdir/api.inc");
9 /** CHANGE THIS name to the name of your form **/
10 $form_name = "My Example Form";
12 /** CHANGE THIS to match the folder you created for this form **/
13 $form_folder = "example";
15 formHeader("Form: ".$forn_name);
17 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
21 <?php
html_header_show();?
>
23 <!-- other supporting javascript code
-->
24 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery.js"></script
>
25 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script
>
28 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
29 <link rel
="stylesheet" href
="../../forms/<?php echo $form_folder; ?>/style.css" type
="text/css">
31 <!-- pop up calendar
-->
32 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot'] ?
>/library
/dynarch_calendar
.css
);</style
>
33 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script
>
34 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_en.js"></script
>
35 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script
>
37 <script language
="JavaScript">
38 // this line is to assist the calendar text boxes
39 var mypcc
= '<?php echo $GLOBALS['phone_country_code
'] ?>';
44 <body
class="body_top">
46 <?php
echo date("F d, Y", time()); ?
>
48 <form method
=post action
="<?php echo $rootdir;?>/forms/<?php echo $form_folder; ?>/save.php?mode=new" name
="my_form">
49 <span
class="title"><?php
xl($form_name, 'e'); ?
></span
><br
>
51 <!-- Save
/Cancel buttons
-->
52 <input type
="button" class="save" value
="<?php xl('Save','e'); ?>">  
;
53 <input type
="button" class="dontsave" value
="<?php xl('Don\'t Save','e'); ?>">  
;
55 <!-- container
for the main body of the form
-->
56 <div id
="form_container">
62 <input type
='text' size
='10' name
='form_date' id
='form_date'
63 value
='<?php echo date('Y
-m
-d
', time()); ?>'
64 title
='<?php xl('yyyy
-mm
-dd
','e
'); ?>'
65 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)' />
66 <img src
='../../pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
67 id
='img_form_date' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
68 title
='<?php xl('Click here to choose a date
','e
'); ?>'>
71 Name
: <input id
="name" name
="name" type
="text" size
="50" maxlength
="250">
73 <input type
='text' size
='10' name
='dob' id
='dob'
74 value
='<?php echo $date ?>'
75 title
='<?php xl('yyyy
-mm
-dd Date of Birth
','e
'); ?>'
76 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc);' />
77 <img src
='../../pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
78 id
='img_dob' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
79 title
='<?php xl('Click here to choose a date
','e
'); ?>'>
82 Phone
: <input name
="phone" id
="phone" type
="text" size
="15" maxlength
="15">
85 Address
: <input name
="address" id
="address" type
="text" size
="80" maxlength
="250">
91 Use this space to express notes
<br
>
92 <textarea name
="notes" id
="notes" cols
="80" rows
="4"></textarea
>
94 <div style
="text-align:right;">
96 <input type
="radio" id
="sig" name
="sig" value
="y">Yes
98 <input type
="radio" id
="sig" name
="sig" value
="n">No
101 <input type
='text' size
='10' name
='sig_date' id
='sig_date'
102 value
='<?php echo date('Y
-m
-d
', time()); ?>'
103 title
='<?php xl('yyyy
-mm
-dd
','e
'); ?>'
104 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)' />
105 <img src
='../../pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
106 id
='img_sig_date' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
107 title
='<?php xl('Click here to choose a date
','e
'); ?>'>
111 </div
> <!-- end form_container
-->
113 <!-- Save
/Cancel buttons
-->
114 <input type
="button" class="save" value
="<?php xl('Save','e'); ?>">  
;
115 <input type
="button" class="dontsave" value
="<?php xl('Don\'t Save','e'); ?>">  
;
120 <script language
="javascript">
121 /* required for popup calendar */
122 Calendar
.setup({inputField
:"dob", ifFormat
:"%Y-%m-%d", button
:"img_dob"});
123 Calendar
.setup({inputField
:"form_date", ifFormat
:"%Y-%m-%d", button
:"img_form_date"});
124 Calendar
.setup({inputField
:"sig_date", ifFormat
:"%Y-%m-%d", button
:"img_sig_date"});
126 // jQuery stuff to make the page a little easier to use
128 $
(document
).ready(function(){
129 $
(".save").click(function() { top
.restoreSession(); document
.my_form
.submit(); });
130 $
(".dontsave").click(function() { location
.href
='<?php echo "$rootdir/patient_file/encounter/$returnurl";?>'; });