Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Field CSS customisation
- $style = 'span.optional, span.star {'
- . 'display: none;'
- . '}';
- // Postcode Lookup
- $javascript = 'jQuery(document).ready(function(){
- jQuery(\'#postcode_lookup\').getAddress({
- api_key: \'rEGHXMG9qUGt-V5u0cd-PA1941\',
- check_key: true,
- // Invoked if key fails check
- onFailedCheck: function () {
- $("#successStatus").html("Please manually enter your address");
- },
- output_fields:{
- line_1: \'#jform_profile_address1\',
- line_2: \'#jform_profile_address2\',
- line_3: \'#jform_profile_address2\',
- post_town: \'#jform_profile_city\',
- county: \'#jform_profile_region\',
- postcode: \'#jform_profile_postcode\'
- },
- button_class: \'btn btn-primary\',
- input_class: \'hasTooltip\'
- });
- })';
- $doc =& JFactory::getDocument();
- $doc->addScript("/media/getaddress/jquery.getAddress-2.0.0.custom.js");
- $doc->addScriptDeclaration( $javascript );
- $doc->addStyleDeclaration( $style );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement