AcyMailing
Back to LATEST versionOur siteForumBlog
Version 5
Version 5
  • AcyMailing 5 documentation
  • Main pages
    • Users
      • Export Users
      • Import Users in AcyMailing
      • Mass actions
    • Lists
      • Distribution lists
      • List: Add/Edit
    • Newsletters
      • A/B Testing
      • Spam Test
      • Schedule your Newsletter
      • Smart-Newsletters
      • Campaigns
      • Joomla notifications
      • Simple Sending
      • Templates
        • Import a template
    • Queue
    • Statistics
      • Click statistics
      • Comparison page
      • Statistics charts
    • Configuration
      • Configuration tabs
        • Configure your send process
          • DKIM : DomainKeys Identified Mail
          • External SMTP service
        • Cron task
        • Geolocation
        • Captcha
        • Google Analytics
        • Forward to a friend
        • Access level
      • Custom fields
      • Bounce Handling
      • Unsubscribe page
  • Public part of your site
    • Configure your Subscription Module
    • Latest Newsletters module
    • Newsletter archive section
    • Front-end Newsletter edition
  • FAQ
    • Insert your subscription form in your article
    • Update AcyMailing 5
    • Your send process is slow?
    • Could not instantiate mail function
    • Sending issue
    • Spam issue
    • Compatibility issues
    • Install / Update issues
  • Integration plugins
    • Installed with AcyMailing
      • Insert Joomla articles in your newsletter
      • Plugin : Statistics
      • Plugin: (auto)Subscribe during Joomla registration
      • Plugin: Call to action
      • Plugin: Date - Time
      • GMail Inbox Actions
      • Plugin: Joomla Module Loader
      • Plugin: Joomla User
      • Plugin: Manage Subscription
      • Share your Newsletter on social networks
      • Plugin: Subscriber
      • Plugin: Website Links
      • AcyMailing plugin : table of contents generator
    • User management
      • Plugin: AltaUserPoints
      • Plugin : VirtueMart Checkout Subscription
      • Plugin: CB User
      • Plugin: CJBlog
      • Plugin: com_contact
      • Plugin: Community Builder
      • Plugin: Easy Profile
      • Plugin: EasySocial
      • Plugin: ExtendedReg Profile Information
      • Plugin: Grumpy Contacts
      • Plugin: Ja Job Board
      • Plugin: JomSocial
      • Plugin: JUGA
      • Plugin: K2 Users
      • Plugin: MightyMembership
      • AlphaUserPoints plugin
    • Content management
      • Plugin : AdsManager
      • Plugin: AdsManager (by Heigho)
      • Plugin : Dj-Catalog 2
      • Plugin : Kunena
      • Plugin: AdAgency
      • Plugin: CiviCRM
      • Plugin: Cobalt
      • plugin: Dj-Classifieds
      • plugin: EasyBlog
      • plugin: EasyDiscuss
      • Plugin: Emerald
      • Plugin: EZautos
      • plugin: FLEXIcontent
      • Plugin: Form2Content
      • Plugin: GMapFP
      • plugin: JoomBlog
      • plugin: Joomla! Estate Agency (JEA)
      • plugin: K2 items
      • Plugin: ListBingo
      • plugin: Lyften Bloggie
      • Plugin: MightyResources
      • Plugin: MosetsTree
      • Plugin: Newsfeeds
      • plugin: SEBLOD 3
      • Plugin: Sobi2
      • Plugin: SobiPro
    • Events
      • plugin: !Cagenda
      • Plugin: DPCalendar
      • Plugin: EventList
      • plugin: Event Booking
      • Plugin: jCalPro Events
      • Plugin: jEvents
      • Plugin: Matukio
      • plugin: MijoEvents
      • Plugin: Ohanah
      • Plugin: redEvent
      • Plugin: RsEvents
      • plugin: RSEvents Pro
    • E-commerce
      • Plugin: Awo Affiliate
      • Plugin: HikaShop
      • plugin: JoomShopping
      • plugin: K2Store
      • Plugin: redSHOP
      • Plugin: MijoShop
      • Plugin: VirtueMart Coupons
      • Plugin: VirtueMart
      • AwoCoupon plugin
    • Subscription system
      • Plugin: AEC
      • Plugin : CBSubs
      • Plugin: Membership Pro
      • Plugin: MightyRegistration
      • Plugin: OSE Membership Control Manager
      • Plugin: Payplans
      • Plugin: AkeebaSubs
      • AEC AcyMailing micro-integration
    • Files management
      • Plugin : RokDownloads
      • Plugin: DOCman
      • plugin: DOCman 2
      • Plugin: Document Media Manager
      • Plugin: jDownloads
      • Plugin: Joomdoc
      • Plugin: PhocaDownload
      • Plugin: Remository
    • Other
      • Module: Statistics dashboard
      • module: Quick icon for J1.5
      • Plugin : Module Article
      • plugin: AcyMailing toolbox
      • plugin: Auto-create a list on user registration
      • plugin: Add CC
      • Plugin: Create Joomla user
      • Plugin: Autotweet NG
      • plugin: Edit notification
      • plugin: Export users in mass action
      • plugin: List owner notification
      • Plugin: Modify user group
      • plugin: Quick icon for J2.5 and J3.X
      • plugin: Search
      • Plugin: Smart Search
      • Plugin: Squeeze Page
      • plugin: Stop Smart-Newsletter during weekend
      • Universal tag plugin
      • Universal filter plugin
      • Birthday Newsletter
  • Developers
    • AcyMailing 5 Developer Documentation
    • Customize the way the content inserted in emails by plugins
    • Conditional display
    • Multiple queue system
    • External subscription form
    • Subscription via URL
      • Fabrik Form and AcyMailing
      • ChronoForm and AcyMailing
      • RSForm!Pro and AcyMailing
      • BreezingForms and AcyMailing
Powered by GitBook
On this page
  • iframe integration
  • Default subscription form
  • Add a captcha to your form
  • Add custom fields to your form
  • Display your lists on the form
  • Add a "terms and conditions" checkbox
  1. Developers

External subscription form

By default AcyMailing will install a subscription module so you can simply publish it and configure it to get a subscription form on your website.

But if you want to add a subscription form on another website or on your facebook page, then you will need an external subscription form.

iframe integration

If your other website enables you to include an iframe, the easiest way to embed your subscription form on that other website is to use this method:

Create an AcyMailing subscription module on your own website and configure it the way you want (with captcha, extra fields, terms and conditions...) Copy the ID of that module and then on your other website, create an iframe to display this module:

<iframe src="http://www.YOURWEBSITE.COM/index.php?option=com_acymailing&ctrl=sub&task=display&tmpl=component&formid=YOUR_MODULE_ID" height="YOUR_HEIGHT" frameborder="0" width="100%" ></iframe>

Please make sure to replace your website url, your module id and the iframe height with the right values.

We recommend you to set the module redirection to "ajax".

With this system you can integrate your Newsletter subscription module to your Facebook page, so that all your fans can subscribe to your newsletter directly from Facebook.

Default subscription form

The standard code is:

<form action="http://YOURWEBSITE/index.php?option=com_acymailing&ctrl=sub" method="post">
	<table class="acymailing_form">
		<tr>
			<td><label for="user_name">Name</label></td>
			<td><input id="user_name" type="text" name="user[name]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_email">E-mail</label></td>
			<td><input id="user_email" type="text" name="user[email]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_html">Receive</label></td>
			<td>
				<input type="radio" name="user[html]" value="0" id="user_html_0">
				<label for="user_html_0">Text</label>
				<input type="radio" name="user[html]" value="1" id="user_html_1" checked="checked"><label for="user_html_1">HTML</label>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input class="button" type="submit" value="Subscribe" name="Submit" />
			</td>
		</tr>
	</table>
	<input type="hidden" name="acyformname" value="formAcymailing1" />
	<input type="hidden" name="ctrl" value="sub" />
	<input type="hidden" name="task" value="optin" />
	<input type="hidden" name="redirect" value="http://YOUR_REDIRECT_URL" />
	<input type="hidden" name="option" value="com_acymailing" />
	<input type="hidden" name="visiblelists" value="" />
	<input type="hidden" name="hiddenlists" value="YOUR_LISTS" />
</form>

Don't forget to:

  • Replace YOURWEBSITE by the url of your own website!

  • YOUR_REDIRECT_URL by the url of your redirect url

  • YOUR_LISTS by your lists IDs separated by comma. For example if you want the user to be subscribed to your list ID 3 and ID 4 then you should specify 3,4

Add a captcha to your form

If you use one of our commercial versions, you can turn ON the captcha feature on the AcyMailing configuration page and then add a captcha to your subscription form:

<img class="captchaimagemodule" src="http://YOURWEBSITE/index.php?option=com_acymailing&ctrl=captcha&acyformname=formAcymailing1&val=5753" alt="captcha" /> 
<input id="user_captcha_formAcymailing1" class="inputbox captchafield" type="text" name="acycaptcha" size="5" />

Again, don't forget to replace YOURWEBSITE by the url of your own website.

So the whole subscription form code will be:

<form action="http://YOURWEBSITE/index.php?option=com_acymailing&ctrl=sub" method="post">
	<table class="acymailing_form">
		<tr>
			<td><label for="user_name">Name</label></td>
			<td><input id="user_name" type="text" name="user[name]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_email">E-mail</label></td>
			<td><input id="user_email" type="text" name="user[email]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_html">Receive</label></td>
			<td><input type="radio" name="user[html]" value="0" id="user_html_0"><label for="user_html_0">Text</label><input type="radio" name="user[html]" value="1" id="user_html_1" checked="checked"><label for="user_html_1">HTML</label></td>
		</tr>
		<tr>
			<td><img class="captchaimagemodule" src="http://YOURWEBSITE/index.php?option=com_acymailing&ctrl=captcha&acyformname=formAcymailing1&val=5753" alt="captcha" id="captcha_picture" /></td>
			<td><input id="user_captcha_formAcymailing1" class="inputbox captchafield" type="text" name="acycaptcha" size="5" /></td>
		</tr>
		<tr>
			<td colspan="2"><input class="button" type="submit" value="Subscribe" name="Submit" /></td>
		</tr>
	</table>
	<input type="hidden" name="acyformname" value="formAcymailing1" /> 
	<input type="hidden" name="ctrl" value="sub" /> 
	<input type="hidden" name="task" value="optin" /> 
	<input type="hidden" name="redirect" value="http://YOUR_REDIRECT_URL" /> 
	<input type="hidden" name="option" value="com_acymailing" /> 
	<input type="hidden" name="visiblelists" value="" /> 
	<input type="hidden" name="hiddenlists" value="YOUR_LISTS" />
</form>

If you enabled the captcha on your website but you want to use the external subscription form without captcha, then insert the "security key" (displayed on the AcyMailing configuration page, in the captcha area) in an hidden field in your form:

<input type="hidden" name="seckey" value="COPY_YOUR_SECURITY_KEY_VALUE_HERE" />

If you want to add an image to refresh the captcha picture, add the following code where you want to display it in the previous code. Note that you need to add the URL of the picture you want to use (replace YOUR_RELOAD_PICTURE):

<img onclick="document.getElementById('captcha_picture').src=document.getElementById('captcha_picture').src+'0';" src="YOUR_RELOAD_PICTURE"/>

Add custom fields to your form

If you use AcyMailing Enterprise and created some custom fields, you can also add them to your external subscription form.

Each field should be added using the code:

<input name="user[YOUR_CUSTOM_FIELD_COLUMN_NAME]" />

Since AcyMailing 3.6.0, you can edit your custom field and directly copy/paste the html code to include it in your external subscription form.

Display your lists on the form

If you want the user to select the lists he should be subscribed to, you can display them on your form with that code. Please make sure the IDs of these lists are not in the hiddenlists parameter.

<input type="checkbox" name="subscription[]" value="3" />My List ID 3<br />
<input type="checkbox" name="subscription[]" value="7" />My List ID 7<br />
<input type="checkbox" name="subscription[]" value="14" />My List ID 14<br />

Add a "terms and conditions" checkbox

You can add a "terms and conditions" checkbox using this code:

<form action="http://YOURWEBSITE/index.php?option=com_acymailing&ctrl=sub" onsubmit="if(!this.terms.checked){alert('Please accept our terms and conditions');return false;}" method="post">
	<table class="acymailing_form">
		<tr>
			<td><label for="user_name">Name</label></td>
			<td><input id="user_name" type="text" name="user[name]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_email">E-mail</label></td>
			<td><input id="user_email" type="text" name="user[email]" value="" /></td>
		</tr>
		<tr>
			<td><label for="user_html">Receive</label></td>
			<td><input type="radio" name="user[html]" value="0" id="user_html_0"><label for="user_html_0">Text</label><input type="radio" name="user[html]" value="1" id="user_html_1" checked="checked"><label for="user_html_1">HTML</label></td>
		</tr>
		<tr>
		<tr>
			<td colspan="2"><input type="checkbox" value="1" name="terms" /><a href="linktoyourterms">Terms and conditions</a></td>
		</tr>
		<tr>
			<td colspan="2"><input class="button" type="submit" value="Subscribe" name="Submit" /></td>
		</tr>
	</table>
	<input type="hidden" name="acyformname" value="formAcymailing1" /> 
	<input type="hidden" name="ctrl" value="sub" /> 
	<input type="hidden" name="task" value="optin" /> 
	<input type="hidden" name="redirect" value="http://YOUR_REDIRECT_URL" /> 
	<input type="hidden" name="option" value="com_acymailing" /> 
	<input type="hidden" name="visiblelists" value="" /> 
	<input type="hidden" name="hiddenlists" value="YOUR_LISTS" />
</form>

Last updated 5 years ago