I've seen some old questions about this with limited response so I'm hoping I get better responses with this question. I have an angular form that grabs a bunch of baseline information, and has a button on the bottom that says Add Component. This is a many to one relationship - so they can have many components for this one form. I want this secondary form to use crm-popup, to make it clean and consistent, however, I can't seem to load an Angularjs form with it.

this.addComponent = function() {
      url = CRM.url('civicrm\/a\/#/trialadmin/Component');
      // actual url is https://www.sportingdetectiondogs.ca/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/trialadmin/Component?angularDebug=1
      window.location.href = url;

So window.location.href will open the new form but not in a popup window. I'm also not sure how I would return those values then to the original calling form. CRM.loadPage does not work - I don't get any errors in the console or anywhere else - the window pops up, and nothing populates in it. Going to the url manually absolutely works (just not returning - not sure how?).

Thanks again for helping this learning Angular developer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.