Gossamer Forum
Home : Products : DBMan : Installation :

seperate add and search forms

Quote Reply
seperate add and search forms
Has anybody split these 2 functions yet? I want to be able to have a simplified search form different from my add form.
How do I do this OR where should I start looking in the archieves?

I got the view form working thanks to my favorite 2 peoples help.

Boy this stuff is driving me up the wall but I'm loving every minute of it..... SICK :-P [ p for Perl ]

thanks
Quote Reply
Re: seperate add and search forms In reply to
Yep. I've separated them. I just made a separate subroutine for the search form. (I called it html_record_search.) Then, in html_view_search and html_view_failure, I called &html_record_search instead of &html_record_form.

It is addicting, isn't it? Smile

------------------
JPD
Quote Reply
Re: seperate add and search forms In reply to
Will there be any other neccesary changes to be made; ie: in the dbman.cgi script? Or is everything done within html.pl? You don't have this setup posted do you? I was snopping the other day at your site and I don't remember seeing this.... Yeah, saw your note about "use at your own risk...." well, isn't everything else these days?

Yeah!!! I'm getting where I want to be going .... thanks JP :-)

------------------
Thanks for everything !
Quote Reply
Re: seperate add and search forms In reply to
There's no reason you should feel forced to use the &html_record_form in the search form. This is purely for convienance so when first setting it up you don't need to edit every form. You can just remove that section in the search form, and replace it with the html you want.

Hope that helps,

Alex
Quote Reply
Re: seperate add and search forms In reply to
No, you don't have to make any changes to db.cgi. All you need to do is have a different form printed out when the page is created.

I didn't make a mod page for this because each implementation of it would be so different that I couldn't figure out how to describe it in "universal" terms.

You could, as Alex suggested, just put your search form within the html_view_search and html_view_failure subroutines. I put it in a separate subroutine for two reasons. One is because you'll want the same search form to be displayed in html_view_failure and by having it in a subroutine you can call it both ways. The other reason is that I like having my form subroutines together in the html.pl script. Even though changes might require editing both html_record_form and html_record_search, at least they're close together in the script so I don't have to go looking for everything I need to change.


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