Gossamer Forum
Home : Products : DBMan : Customization :

Lose radio button where only 1 record

Quote Reply
Lose radio button where only 1 record
I'm hoping to clean up one aspect. Where a contributor runs db.cgi to view and modify his/her records -- and only one record is returned -- I'd like to avoid the need for the radio button to be displayed and clicked as part of the modify process.

Is there a straightforward modification to achieve this?

TIA,

Andy
Quote Reply
Re: Lose radio button where only 1 record In reply to
It should already do that. Have you tried it?

If it doesn't work as you want, check to make sure the following code is in sub html_modify_form:

Code:
if (($numhits == 1) and !$in{'nh'}) {
$in{'modify'} = $hits[$db_key_pos];
&html_modify_form_record();
return;
}

This will probably all be one one line if it's in your file already. It should be just after

Code:
my ($numhits) = ($#hits+1) / ($#db_cols+1);

right at the top of the subroutine.



------------------
JPD