MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Upgrade for feedback.html



I just wrote a little modification for feedback.html and thought I'd share
it. It allows you customize the data in the feedback form using data from
a table named feedback.asc. You call the modified feedback with a
parameter which is a key in feedback.asc (if no parameter, it works a
normal), for example:

  [area feedback WEBMASTER]

It also interpolates any tags in your database entries which can be handy.
This is for MV3.14 and only lightly tested.

Here is the code for feedback.html:

[if session arg]
[then]
<H1>[data base=feedback field=title key="[data session arg]"]</H1>
[data base=feedback field=comment key="[data session arg]"]
[if !scratch feedback_active]
[value name="feedback_subject" set="[data base=feedback field=subject
key='[data session arg]' interpolate=1]" hide=1]
[value name="feedback_message" set="[data base=feedback field=message
key='[data session arg]' interpolate=1]" hide=1]
[/if]
[/then]
[else]
<H1>Feedback</H1>
[/else]
[/if]
[set feedback_active]1[/set]
<FORM ACTION="[process-target]" METHOD=POST>
<INPUT TYPE=hidden NAME=mv_todo VALUE=return>
<INPUT TYPE=hidden NAME=mv_check VALUE=check_form>
<INPUT TYPE=hidden NAME=mv_arg VALUE=[data session arg]>

and...

<td width=360><TEXTAREA NAME=feedback_message COLS=40 ROWS=15>[value
feedback_message]</TEXTAREA></td>


Here is the code for special/feedback.html (Hey Mike, how about calling it
feedback2.html instead to avoid confusion):

form_mail
(
	q{[if session arg][data base=feedback field=email key="[data session
arg]"][else]__ORDERS_TO__[/else][/if]},
	q{[value feedback_subject]},
	q{[value feedback_email]},


Here is the database feedback.asc:

code	email	title	comment	subject	message
GENERAL	info@mydomain.com	Feedback	This form is for general feedback.
General Question
WEBMASTER	webmaster@mydomain.com	Contact the Webmaster	This is for
technical questions	Technical Question	Dear Webmaster,


Obviously you need to add this to catalog.cfg:

Database            feedback    feedback.asc        TAB



Search for: Match: Format: Sort by: