Gossamer Forum
Home : Products : DBMan : Customization :

Modifying

Quote Reply
Modifying
I'm using the Modify Multiple records at once: mod. What I'm wanting to do is that if you search under a specific field (i.e. Bat1) it only shows the Bat1 textbox and the Bat1Points texbox. Is this possible? If so how?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] Modifying In reply to
I tried using this mod once, but ran into the same problem. My first idea was to display only the fields you want to see and have the rest "hidden".

I'd do something like below in your build_html_mult_record_form sub:

if ($view_search) {
if ($in{bat1}) {print qq| <input type="text" name="$field">|;} else {print qq|<input type="hidden" name="$field">|;}

}


However, I don't think the multiple record mod works in that manner (does it?). It's one of those I have trouble hacking.

The solution will most likely lie in this bit of the sub:

elsif ($db_form_len{$field} =~
/(\d+)x(\d+)/) { $output .= qq~<tr><td align=right valign=top width=20%><$font>$field:</font></td><td width=80%><textarea wrap="virtual" name="$name" cols="$1" rows="$2">$rec{$field}</textarea></td></tr>\n~; }
elsif ($db_form_len{$field} == -1) { $output = qq~<input type=hidden name="$field" value="$rec{$field}">\n$output~; }
elsif ($db_form_len{$field} == -2) { $per_admin ? ($output .= qq~<tr><td align=right valign=top width=20%><$font>$field:</font></td><td width=80%><input type=text name="$field" value="$rec{$field}" maxlength="$db_lengths{$field}"></td></tr>~) :
($output = qq~<input type=hidden name="$field" value="$rec{$field}">$output~); }
else { $output .= qq~<tr><td align=right valign=top width=20%><$font>$field:</font></td><td width=80%><input type=text name="$name" value="$rec{$field}" size="$db_form_len{$field}" maxlength="$db_lengths{$field}"></td></tr>\n~; }
}
$output .= "</table></p>\n";
return $output;
Quote Reply
Re: [Watts] Modifying In reply to
Thanks for that Watts.

In the end I've given up on DBMAN and am writing my own PHP script for this project for Cricket Web - a lot easier. Should be faster and I don't have that 1MB limit to worry about.

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------