Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Multiple modify_success templates?

Quote Reply
Multiple modify_success templates?
    

While I have some experience with the regular version of DBMan, I am still quite new to the SQL version.

I am very impressed with what I have seen so far, so I know there's probably a simple answer to my question.

Basically, I am working on a large data table with over 100 fields. To keep things from getting too confusing to the user, I've broken up the various fields into related sections for the the "add" and "modify" forms.

I've managed to figure out how to link to the various data entry forms by accessing the templates using "f=" in the URL string.

But, I am a little puzzled as to how I should set up these add/modify forms so that users will be taken to unique a "modify_success" (or "add_success") page that is related only to the specific data entry form from which they just submitted the data.

Any assistance on this would be much appreciated.

- - -

Michael Liimatta, Director of Education
Rescue College, Kansas City MO USA
http://www.rescue.edu

Last edited by:

Liimatta: Mar 9, 2002, 4:32 PM
Quote Reply
Re: [Liimatta] Multiple modify_success templates? In reply to
Hello

I´m planning to use a table with a lot of item, and I want to do several forms to include / modify

I see that you´ve done that, Using different templates do include specific information isn´t right?

What´s the trick?

Thank you

Fábio
Quote Reply
Re: [assombracao] Multiple modify_success templates? In reply to
Basically, in the plain perl version of DBMan, I would create different .cfg files to access the same database, but use different html.pl files in order to diplay the information in various formats.


With the SQL version, I have been creating different template sets and accessing them by adding "t=template_set_name" to the URL accessing the script in the "form action" tag.

- - -

Michael Liimatta, Director of Education
Rescue College, Kansas City MO USA
http://www.rescue.edu

Last edited by:

Liimatta: Mar 21, 2002, 7:49 AM
Quote Reply
Re: [Liimatta] Multiple modify_success templates? In reply to
Hello

I tried this way, but can´t get it working, maybe I should try in the form

The solution I found is to do something like that,

(in footer.html)

<%if add_p%>
<a href="db.cgi?do=add_form&db=<%db%>&tipo=Casa">Casa</a> |
<%endif%>

And in the add_form.html

<%if tipo eq Casa%>
<%include add_form_casa.html%>
<%endif%>


<%if tipo eq Apartamento%>
<%include add_form_apartamento.html%>
<%endif%>


I tried this way in the footer.html

<%if add_p%>
<a href="db.cgi?do=add_form&db=<%db%>&t=add_form_apartamento.html">Apartamento</a> |
<%endif%>

(what I think will be far easier because doesn´t have to do several <%if tipo eq %> to include the specific form fields) but didn´t work, i get a

Invalid Template add_form_apartamento.html

where did you put the "t=template_set" ?
Quote Reply
Re: [assombracao] Multiple modify_success templates? In reply to
   

I created the various template sets offline with an HTML editor and ftp'd them up to this directory on the web server:

/cgi-bin/dbsql/admin/templates

Then, I can modify them further if I want selecting the "Templates" menu in DBMan SQL Admin.

- - -

Michael Liimatta, Director of Education
Rescue College, Kansas City MO USA
http://www.rescue.edu

Quote Reply
Re: [Liimatta] Multiple modify_success templates? In reply to
Cool, get it working

Understand now, You used the hole template set, and not only an template.html

But it will work in the search results?

I think if we use both technics it do the trick

Get work on it

Thanks!

Fábio