No image available

Postcode.nl auto-complete

Completes the address forms via postcode.nl.

Developed by ApiumNL

Get This Module Free on GitHub
License: MIT Status: Unknown Health: Very Outdated

Info updated 1 month ago

Sources
Last commit: Nov 5, 2018
Type
Module

Info checked: Mar 2, 2026

PostcodeNL <small>v1.0.0</small>

Currently only works for <code>NL</code>, not <code>BE</code>! For <code>NL</code>, this totally suppresses standard input mechanisms - _i.e._, you will depend on the availability of the webservice.

How to use

This is relatively straightforward, but might require some tweaking, depending on your theme. First, locate the latest release here and download it. Thereafter, you can attempt to use it in a test environment - if this works, you are set!

If not, however, you might want to change the template file. This one can be found at <code>views/templates/hook/address.tpl</code>, relative to the module. This file is the base address template, extended with a hook call to <code>displayPostcodeNL</code>. Overwrite this template with your theme's <code>address.tpl</code>, but be sure to include the hook call in the right place, that is, just below the postcode input field. E.g. like this,

{if $field_name eq 'postcode'}

{assign var=&quot;postCodeExist&quot; value=true} &lt;div class=&quot;required postcode form-group unvisible&quot;&gt; &lt;label for=&quot;postcode&quot;&gt;{l s=&#039;Zip/Postal Code&#039;} &lt;sup&gt;*&lt;/sup&gt;&lt;/label&gt; &lt;input class=&quot;is_required validate form-control&quot; data-validate=&quot;{$address_validation.$field_name.validate}&quot; type=&quot;text&quot; id=&quot;postcode&quot; name=&quot;postcode&quot; value=&quot;{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address-&gt;postcode)}{$address-&gt;postcode|escape:&#039;html&#039;:&#039;UTF-8&#039;}{/if}{/if}&quot; /&gt; &lt;/div&gt; { This&#039;d be the ideal place to insert the hook call } {hook h=&#039;displayPostcodeNL&#039;} {/if}

If this does not work, feel free to open an issue.

Licensing

This module is released under an MIT license, copyright Apium (2018). Other works used include,

1. The Postcode.nl REST client, released under a Simplified BSD license.

Version

The current version is 1.0.0, as of 1st of November 2018.

  • Riferimento
    postcodenl

  • License
    MIT
  • Status
    Unknown

Commenti (0)

Ancora nessuna recensione da parte degli utenti.
Caricamento in corso ...