Information: Forum is in read-only mode
For details and other support options see https://www.adiscon.com/news/support-forum-set-to-read-only-mode/

HTMLMail

Support, Questions and Discussions on NewsMerge

Moderator: alorbach

Google Ads


HTMLMail

Postby Chris » Thu Aug 21, 2003 6:23 pm

The new "HTMLMail" field is really useful - but how can I get this set automatically from the user's input?
Chris
 

Postby alorbach » Fri Aug 22, 2003 9:02 am

You can use a checkbox in the subscribe form.
Here is a sample code for it

Code: Select all
<form ACTION="subscribe.whatever">
<!-- other fileds -->
<input type="checkbox" name="htmlmail" value="1">
</form>


If you want it checked by default, just add "checked" after value="1".
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

HTMLMail

Postby Guest » Fri Aug 22, 2003 11:47 am

Thanks for your reply.
The example pearl scripts which came with the latest version of NewsMerge seem to be rather old and do not refer to the HTMLMail variable. I have changed this but when a new subscription is sent, the field HTMLMail in the subscribers data is always set to true, even if the checkbox on the form is not checked.
Have you got an up to date example script? Should I be adding something else to the script (I have just added the variable "htmlmail").
Many thanks.
Guest
 

Postby alorbach » Fri Aug 22, 2003 12:00 pm

Oh, i did not think about it, if the field is not set, the default will be htmlmail = true in NewsMerge.

In this case, try it with Option boxes, see the sample below
Code: Select all
Do you want to receive html mails?:
<select name="htmlmail">
<option value="1">Yes<BR>
<option value="0">No
</select>


And yes the perl sampl is rather old ;)
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to NewsMerge

Who is online

Users browsing this forum: No registered users and 0 guests

cron