Gossamer Forum
Home : Products : DBMan : Customization :

multiple records

Quote Reply
multiple records
Hello,
i have this conditional code in the sub html_record_form:
if ($per_admin){print qq|
<b>Controllato?:</b>|;
print &build_radio_field("controllato",$rec{'checked'});
}
else { print qq|<input type="hidden" NAME="checked" VALUE="no">|;}

If a user add a new record or modify an old one the value of field "checked" will be "no" so that admin can control if he has checked or not new records. My problem is this:
how can I add for admin, in the search results, a button like "check all" so he can change to "yes" the field "checked" of multiple records in one time?

Quote Reply
Re: multiple records In reply to
You may want to look into using the "Validation" mod which can be found it the resource center.

This mod would provide you with a list of record which would need to be validated or approved by admin.

I believe this would be the best solution for what you want to do, as only those record which need to be validated would appear when you choose that menu option.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: multiple records In reply to
Hi,
thank you for the reply. My problem is this: the validate mod don't let a record to be viewed if admin don't validate it, ok? I need only that the value of field "checked" turn to "yes" if admin validate a record, but I want that this record still remains with viewing permissions. So, if someone posts or modify a new record the value of field "checked" will be "no":
if ($per_admin){print qq|
<b>Controllato?:</b>|;
print &build_radio_field("controllato",$rec{'checked'});
}
else { print qq|<input type="hidden" NAME="checked" VALUE="no">|;}
but if admin clicks on "check all" this value turn to yes.
I need a sub something like:

for(i=0,i=number_of_record_in_the_search_result,i++){
records_in_results.checked="yes";
}

..but i can't do yet this with perl...
Tnx,
Daniele


Quote Reply
Re: multiple records In reply to
You can setup the validation mod so that the records can be viewed regardless of whether they are validated or not.

To not have them viewable is just an option set according to how you enter the code in places.

This is the only way that I know of to be able to get a list of records which have a specific entry such as yes/no in a field.

You may want to check the FAQ noted below and look under the section "fields" and see if you can find anything else that was used which is similiar to what you want to do.

Sorry I could not be of more help.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: multiple records In reply to
Np,
thank you a lot for the reply!