Gossamer Forum
Home : Products : DBMan SQL : Discussion :

relationships and Dbsql::HTML

Quote Reply
relationships and Dbsql::HTML
It seems to me that one of the most useful aspects of the new relational version is the ability to define relationships and have DBManSQL automatically generate a select list based on a foreign key. But can this only be done automatically when you're using Dbsql::HTML to auto-create the form html?

Is there a way to use those relationship features with custom templates?

If not (and, frankly, a happier option) is there a way to edit the appearance of the forms generated by Dbsql:HTML without editing HTML.pm directly?

Thanks very much for any help or assistance.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] relationships and Dbsql::HTML In reply to
Hi,

It is not only for generating a select list, but also it can handle the queries which will be used to search the tables have to be defined. Please have a look at our demo for more details.

Definitely, you can use <%Dbsql::Relation::HTML::generate_full_down('primary_table', 'related_table')%> to generate the drop-down menu in your templates.

TheStone.

B.
Quote Reply
Re: [TheStone] relationships and Dbsql::HTML In reply to
Thanks - that works perfectly!

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [TheStone] relationships and Dbsql::HTML In reply to
Hi there,

Is there in fact a good way to edit some of the default formatting functions in Dbsql::HTML? I'm not looking to do anything terribly fancy - I'm just trying to get as much mileage out of the "default" templates as possible, since I have about 50 tables that all need to be displayed in the same basic way (fonts, table widths, etc.)

One example of something very simple that I'm having a tough time figuring out:

On the add_form display, the left-hand table column lists the "display as" values, while the right-hand column has the input fields. The "display as" values are currently being called up with the following html formatting:

<td valign=top align=left width='30%'><font face="Tahoma,Arial,Helvetica" size=2>DISPLAY_VALUE</font></td>

But I can't for the life of me find the instructions to do that in Dbsql::HTML, or anywhere else for that matter. I'm relatively new to working with perl modules, so I'm sure I'm just not looking in the right place. But surely it wouldn't be devastating to the functionality of the script for me to be able to change that html formatting so that "display as" values are right-aligned, for example.

Can anyone provide any guidance or suggestions on this issue?

Thanks very much in advance for any assistance.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund