Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Maintain.cgi-How to omit fields?

Quote Reply
Maintain.cgi-How to omit fields?
In the maintain.cgi an editor receives a form with all the fields like in admin.
If I would like the editor to see only the fields that users are submitting, where should I look at?
Also, the editor has not available the duplicate check. Can this be added?

Quote Reply
Re: Maintain.cgi-How to omit fields? In reply to
Yes...it can...You can do one of the following:

1) Delete the following codes in the maintain.html file:

Code:

<%message%>


And replace the tag with your own form codes using hidden fields for the fields that you do not want your editors to fill in.

OR

2) Edit the following codes in the sub add_record routine in the maintain.cgi file:

Code:

$USER->{message} = $LINKDB->build_html_record_form ($LINKDB->get_default
s, { show_attach => 1, hide_key => 1, CategoryID => \&build_subset_category_list
});


with the following:

Code:

$USER->{message} = $LINKDB->build_html_editor_record_form ($LINKDB->get_default
s, { show_attach => 1, hide_key => 1, CategoryID => \&build_subset_category_list
});


Notice the bolded codes....

Then you will have to add a subroutine called sub build_html_editor_record_form in the DBSQL.pm file, which should be a watered down version of sub build_html_record_form routine.

Regards,

Eliot Lee