Trying to make a custom registration block, where is this php function which generates javascript getting called?

Permalink
We are trying to make a registration block, that would have a few settings like "add registrant to group" and "send to this page after registering".

We basically pulled all the code from the registration single page and put it into a block. It seems to work correctly, except when we add an address user attribute (which adds itself to the registration form), and when we place the block onto a page it never completes the process.

I checked javascript console and it says
ccm_attributeTypeAddressStatesTextList is not defined

It looks like this this list should be being generated by a php function
public function action_load_provinces_js() {
      $h = Loader::helper('lists/states_provinces');
      print "var ccm_attributeTypeAddressStatesTextList = '\\\n";
      $all = $h->getAll();
      foreach($all as $country => $countries) {
         foreach($countries as $value => $text) {
            print $country . ':' . $value . ':' . $text . "|\\\n";
         }
      }
      print "'";
   }


which is defined in this controller
/concrete/models/attribute/types/address/controller.php

It looks like it is supposed to spit out some javascript that creates the states list.

What we don't understand is where that function is being initially called. It gets called correctly on the normal registration form, but not on our block.

If we do a code search action_load_provinces_js only comes up where it is defined.

Any help in troubleshooting would be much appreciated.

adavis
View Replies:
adavis replied on at Permalink Reply
adavis
No takers on this?
simonknibbs replied on at Permalink Reply
simonknibbs
Did you get a solution to this problem? as I am experiencing the exact same issue?
adavis replied on at Permalink Reply
adavis
No, we ended up just using single pages, not blocks
simonknibbs replied on at Permalink Reply
simonknibbs
Thanks for the quick response, will have to find another solution then.