[Templates] Possible problem w/ Stash
Drew Taylor
dtaylor@carescout.com
Wed, 27 Mar 2002 15:12:04 -0500
Hi,
I'm finishing up an application here at work and I'm running into a problem
getting data to print. The 10,000 foot overview is that I have a template
where some data is output, and some is not. The top half of the form works
properly, but the bottom does not. I've tried w/ 2.06 (w & w/o XS stash),
and 2.06f (w & w/o XS stash). It does the exact same behavior in all
conditions. Help! It doesn't make any sense. Also, it doesn't matter if I
compile templates.
Drew
Here's an example of what I'm trying:
[% FOREACH type = rate_types.keys %]
<tr>
<td><font face="Arial, Helvetica, sans-serif" size="2">
[% rate_types.${type} %]:</font></td>
<td><font face="Arial, Helvetica, sans-serif" size="2">
<input type="text" name="[% type %]" value="[% data.${type} %]"
size="9">
([% type %])</font></td>
</tr>
[% END %]
Which prints this:
Therapy: (empty textbox here) (rate_therapy)
Home Health Aide: (empty textbox here) (rate_hh_aid)
Homemaking: (empty textbox here) (rate_homemaking)
Nursing (RN): (empty textbox here) (rate_rn)
Certified Nursing Assistant: (empty textbox here) (rate_cna)
Nursing (LPN): (empty textbox here) (rate_lpn)
Personal Care Attendant: (empty textbox here) (rate_personal)
And here is a Data::Dumper snippet of the data being passed to $tt->process.
process(): data passed is: $VAR1 = {
'rate_types' => {
'rate_therapy' => 'Therapy',
'rate_hh_aid' => 'Home Health Aide',
'rate_homemaking' => 'Homemaking',
'rate_rn' => 'Nursing (RN)',
'rate_cna' => 'Certified Nursing Assistant',
'rate_lpn' => 'Nursing (LPN)',
'rate_personal' => 'Personal Care Attendant'
},
'data' => {
'provide_meds' => 1,
'num_clients' => 400,
'pay_medicare' => 1,
'zip1' => '02420',
'message' => 'A new marketing message',
'zip2' => '02481',
'refer_al_per' => '',
'zip3' => '',
'address' => '430 W MAIN ST STE 1',
'zip4' => '',
'approval_status' => 'pending',
'provide_other2_desc' => '',
'auth_title' => 'Owner',
'refer_other' => '0',
'lan1_written' => 'English',
'lan2_written' => '',
'town1' => 'Lexington',
'admis_contact' => 'Joe Blow',
'city' => 'DOTHAN',
'lan3_written' => '',
'town2' => 'Wellesley',
'phone' => '(334) 793-6854',
'town3' => '',
'town4' => '',
'refer_al' => '0',
'provide_trans' => 1,
'employee1_num' => 10,
'employee2_num' => 25,
'employee3_num' => '0',
'refer_hos_per' => '',
'pay_private' => 1,
'name_change_desc' => '',
'network_desc' => 'Blue Cross',
'rate_therapy' => '10.0000',
'rate_hh_aid' => '11.0000',
'user_id' => 33479,
'rate_personal' => '16.0000',
'imagelink' => undef,
'auth_name' => 'Drew Taylor',
'employee1_type' => 'RPN',
'provnum' => '017013',
'provide_homemaking' => '0',
'ccrc_desc' => 'Standard residence services',
'for_profit' => 1,
'ccrc_name' => 'MyResidence',
'ccrc' => 1,
'refer_hos' => '0',
'lan3_spoken' => '',
'name_change' => 2,
'webadd' => undef,
'lic_num' => 352352,
'submission_date' => '0000-00-00',
'refer_phy_per' => 54,
'network' => 1,
<snip>
}
}
Drew Taylor
Software Engineer
CareScout.com
phone: (781) 431-7033 x 350