Gossamer Forum
Home : Products : DBMan : Customization :

Searching using a ListId

Quote Reply
Searching using a ListId
I want to search my database using a listid field (so I require the field to be input when searching) but as the field is system generated I do not want the field to be modifiable.
I have said in my logic: set the field to "hidden" if in add mode but set to "text" if in search mode.
Unfortunately when commiting my modification to the database I get:
ListId (Can not be left blank)
Any ideas what I should do.

Thanks in advance,
Patrick
Quote Reply
Re: Searching using a ListId In reply to
I'm not realy to sure what you mean, but I'll give it a shot.
Do you want the listid field to be mandatory in your search form, but not in your add form.
If so, this is what I would do.
Set your not_null in your listid database field to 0, which would fix your add form problem, and use a javascript to validate your listid field in your search form.
I prefer to use javascript for form validation as it is client side, and therefore a lot faster then CGI validation, which is server side.
You can pick a number of good scrips from most javascript sites, and they are very small, usually only a couple of lines.

Hope this helps
Bob