I'm another newbie to DBMan and Perl, so please bear with me if I'm not using the correct terminology.
From what I've read it sounds like I need a conditional field. I'm building a database of abstracts, and different types of abstracts have different fields associated with them.
http://www.ceri.memphis.edu/cgi-bin/db_ab/db.cgi?db=abstracts&uid=default&view_search=1
Since the field for the type of abstract is a radio field, the users can only select one type. However, they can still answer fields that aren't related to the type. I've color-coded the table cells for the different types of abstracts, but I think I'd better try to make it foolproof.
This is what the fields I'm talking about look like:
'Type' => [ 7, 'alpha', 0, 20, 1, '', ''],
'Prof_meet' => [ 8, 'alpha', 40, 255, 0, '', ''],
'Prof_date' => [ 9, 'alpha', 10, 10, 0, '', ''],
'Pub_name' => [10, 'alpha', 40, 255, 0, '', ''],
'Pub_date_sub' => [11, 'alpha', 10, 10, 0, '', ''],
'Pub_date_adm' => [12, 'alpha', 10, 10, 0, '', ''],
'Prop_ag' => [13, 'alpha', 20, 255, 0, '', ''],
'Prop_dead' => [14, 'alpha', 10, 10, 0, '', ''],
'Prop_resub' => [15, 'alpha', 0, 6, 0, '', ''],
'Prop_date_sub' => [16, 'alpha', 10, 10, 0, '', ''],
'Prop_start' => [17, 'alpha', 10, 10, 0, '', ''],
'Prop_dur' => [18, 'alpha', 20, 255, 0, '', ''],
'Thesprop_type' => [19, 'alpha', 0, 4, 0, '', ''],
'Thesprop_date' => [20, 'alpha', 10, 10, 0, '', ''],
'Thesprop_adv' => [21, 'alpha', 40, 255, 0, '', ''],
'Thes_type' => [22, 'alpha', 0, 4, 0, '', ''],
'Thes_date' => [23, 'alpha', 10, 10, 0, '', ''],
'Thes_adv' => [24, 'alpha', 40, 255, 0, '', ''],
'Coll_inst' => [25, 'alpha', 40, 255, 0, '', ''],
'Coll_date' => [26, 'alpha', 10, 10, 0, '', ''],
'Oth_descr' => [27, 'alpha', '40x5', 1000, 0, '', ''],
'Type' => 'Professional Meeting,Publication,Research Proposal,Thesis Proposal,Thesis,Colloquium,Other'
E.g., if the user selects Professional Meeting, the relevant fields are Prof_meet and Prof_date. If it's Publication, then Pub_name, Pub_date_sub, and Pub_date_adm. And so on.
Anyway, I've searched and looked through the forum and the FAQs and haven't run across a similar routine. Would someone be willing to help me get started with this? Or point me in the direction of a previous post?
From what I've read it sounds like I need a conditional field. I'm building a database of abstracts, and different types of abstracts have different fields associated with them.
http://www.ceri.memphis.edu/cgi-bin/db_ab/db.cgi?db=abstracts&uid=default&view_search=1
Since the field for the type of abstract is a radio field, the users can only select one type. However, they can still answer fields that aren't related to the type. I've color-coded the table cells for the different types of abstracts, but I think I'd better try to make it foolproof.
This is what the fields I'm talking about look like:
'Type' => [ 7, 'alpha', 0, 20, 1, '', ''],
'Prof_meet' => [ 8, 'alpha', 40, 255, 0, '', ''],
'Prof_date' => [ 9, 'alpha', 10, 10, 0, '', ''],
'Pub_name' => [10, 'alpha', 40, 255, 0, '', ''],
'Pub_date_sub' => [11, 'alpha', 10, 10, 0, '', ''],
'Pub_date_adm' => [12, 'alpha', 10, 10, 0, '', ''],
'Prop_ag' => [13, 'alpha', 20, 255, 0, '', ''],
'Prop_dead' => [14, 'alpha', 10, 10, 0, '', ''],
'Prop_resub' => [15, 'alpha', 0, 6, 0, '', ''],
'Prop_date_sub' => [16, 'alpha', 10, 10, 0, '', ''],
'Prop_start' => [17, 'alpha', 10, 10, 0, '', ''],
'Prop_dur' => [18, 'alpha', 20, 255, 0, '', ''],
'Thesprop_type' => [19, 'alpha', 0, 4, 0, '', ''],
'Thesprop_date' => [20, 'alpha', 10, 10, 0, '', ''],
'Thesprop_adv' => [21, 'alpha', 40, 255, 0, '', ''],
'Thes_type' => [22, 'alpha', 0, 4, 0, '', ''],
'Thes_date' => [23, 'alpha', 10, 10, 0, '', ''],
'Thes_adv' => [24, 'alpha', 40, 255, 0, '', ''],
'Coll_inst' => [25, 'alpha', 40, 255, 0, '', ''],
'Coll_date' => [26, 'alpha', 10, 10, 0, '', ''],
'Oth_descr' => [27, 'alpha', '40x5', 1000, 0, '', ''],
'Type' => 'Professional Meeting,Publication,Research Proposal,Thesis Proposal,Thesis,Colloquium,Other'
E.g., if the user selects Professional Meeting, the relevant fields are Prof_meet and Prof_date. If it's Publication, then Pub_name, Pub_date_sub, and Pub_date_adm. And so on.
Anyway, I've searched and looked through the forum and the FAQs and haven't run across a similar routine. Would someone be willing to help me get started with this? Or point me in the direction of a previous post?