netcarver

Released: Street Address Fieldtype + Inputfield

Recommended Posts

@thlinna I have not tried this in FormBuilder yet, though I have tested it in a Repeater Matrix setup. I also know it is not yet compatible with being placed in the User template and accessed by a user from the Profile editor - though when editing the user page from the normal page editor, it works just fine. 

@adrian Thanks for the script example!

Share this post


Link to post
Share on other sites

@netcarver Ok! If someone with more experience with PW and FB could test the compatibility that would be really nice. I was not able to get it working as I would have expected, but I am not in position to evaluate if the problem is between the chair and the keyboard or could it be a bug.

Share this post


Link to post
Share on other sites

I think current incompatibility is more likely than a PEBCAK issue. 🙂

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

I have my doubts it will work with FB - I know I had quite a few issues getting my Phone field working. I think in general multivalue fields need some tweaking to work. I eventually got Phone almost totally supported though.

  • Like 1

Share this post


Link to post
Share on other sites

@thlinna it's definitely a compatability issue. I will need to research how to get this working with FB. Could take a while.

In the meantime, version 1.0.5 is out.

 

Share this post


Link to post
Share on other sites
2 minutes ago, netcarver said:

@thlinna it's definitely a compatability issue. I will need to research how to get this working with FB. Could take a while.

In the meantime, version 1.0.5 is out.

 

Might save you a little time by taking a look at my changes for the phone field here: https://github.com/adrianbj/FieldtypePhone/commit/bc87e50341f62da6b75de9c79e4ac4574517e49a

I think there might be some more changes above, but that's the start of them.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks to @matjazp, I've just pushed 1.0.6 which allows you to include the destination country ISO in the output if needed.

  • Like 2

Share this post


Link to post
Share on other sites

On the to-do list for the next version, is localisation of the input and output country names in the country select list (again thanks to @matjazp). To do this, I plan to release a module that I wrote for a different project back in 2014, but never got around to publishing: LibLocalisation. (It needs a little tidy-up first, as PW has progressed a long way since I first wrote it.) This module allows simple localisation of country names, language names and currencies. The Street Address module will leverage this, if it happens to be installed, to display the select list of countries in the language being used by the user's browser - and to localise the destination country name into the language(s) used in the origin country as this is the language that postal workers in the source country will be used to. There will be extra config options to control this.

Following that, I plan to work on @thlinna's request to make this work with FormBuilder.

Update:

 

  • Like 4

Share this post


Link to post
Share on other sites

@thlinna I have my development copy using LibLocalisation and working with Form Builder now - though it needs some more testing on my part. I'm also not 100% happy with the config controls for the localisation yet, so I'm going to wait a week or so before I release it.

  • Like 2

Share this post


Link to post
Share on other sites

Hi,

I decided to try this module ... so far no luck

Compile Error: Default value for parameters with a class type hint can only be NULL (line 74 of /home/public_html/site/modules/FieldtypeStreetAddress/StreetAddress.php) 

Also, I got this notification:
Failed module dependency: InputfieldStreetAddress requires JquerySelectize

However, after installing jquerySelectize the error didn't go away...

I hope this is somehow some useful information.
 

Share this post


Link to post
Share on other sites

@videokid

Thanks for the report, what version of PW and my module are you using? Also, do you have Form Builder installed?

Share this post


Link to post
Share on other sites

@netcarver

No problem... 
This is an upgrade from PW 2.7.2 and is now PW 3.0.114 [latest dev]
FieldtypeStreetAddress version 1.0.6

I do NOT have Form Builder installed.
 

Share this post


Link to post
Share on other sites

Just to add my experience: on the installation, I also got the warning that InputfieldStreetAddress requires JquerySelectize. When installing JquerySelectize, I got:

PHP Notice: Undefined index: forceLoad in ...\modules\JquerySelectize\JquerySelectize.module:127

This is probably a problem with JquerySelectize, but the error went away after a few submits (or maybe modules refresh?) so I didn't bother with that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.