Gossamer Forum
Home : Products : DBMan : Customization :

Always show list in Modify even with one entry

Quote Reply
Always show list in Modify even with one entry
I'm making a main console where a user can perform all functions from one page using iframes. When a user does a modify search, if there are multiple listings of the same name you get a list in iframe A. I've set up the list to display the info in a table rows. Perfect so far. Then, they click on the radio button and click on Modify Record and the form fields to modify appear in iframe B. The user makes the modifications in in iframe B, and on the completion the end results get sent back to iframe A.

All is working fine. The reason I'm doing this is to have one iframe to do the work in, and one to display results.

The problem lies in if there is only one listing. The actual modify form appears in iframe A instead of B. There are two options that I can think of but don't know how to implement:

- Have modify search results always appear as a list, even if there's only one
- If there is only one, have the modify form appear in iframe B

I've attached a screen shot of the console.
Quote Reply
Re: [mitchB] Always show list in Modify even with one entry In reply to
I don't see a screenshot, but the line you would want to change is in html.pl, sub html_modify_form.

if (($numhits == 1) and !$in{'nh'}) { $in{'modify'} = $hits[$db_key_pos]; &html_modify_form_record(); return; }

(It's all in one line in the default html.pl file.)

If you just take out the line (or just comment it out by putting a # in front of the line, in case you need it again), it will achieve your first goal of having the record appear in a list, even if it's only one. I don't know anything about iframes, so I can't tell you how to work with them, but I would think that if you were going to do anything with them, it would be in this line as well.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Always show list in Modify even with one entry In reply to
That was it! Thanks. As for the frames, I'm just using target in the form tag.