Gossamer Forum
Home : Products : DBMan : Customization :

pass variable from static page

Quote Reply
pass variable from static page
i want to link directly to add form from a static page with one field already populated. i have a list of courses on a static page. when someone clicks on one, i want to open a registration database to the add form with the course number already selected and in a hidden field. is this possible? thanks
Quote Reply
Re: [delicia] pass variable from static page In reply to
i figured it out. i added $rec{'ActivityID'} = $in{'ActivityID'} in html_record_form just before autogenerate and it works.
Quote Reply
Re: [delicia] pass variable from static page In reply to
Yes, that will work unless you need to modify the record. If you do need to modify it, you'll likely get nothing in that field. I would say

if ($in{'add_form'}) {
$rec{'ActivityID'} = $in{'ActivityID'};
}


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.