Answers.Body: <p>Solved my issue with the code snippet which is mentioned here - <a href="https://docs.civicrm.org/dev/en/latest/framework/ajax/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/framework/ajax/</a> called CRM.livePage.js.
  I added it to my tpl file as suggested above and it now refreshes the tab I'm on!</p>
  
  <p>Thanks
  Norm</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-11T20:47:59.863Z
Answers.LastActivityDate: 2018-11-11T20:47:59.863Z
Answers.UserDisplayName: Norm Dressler
Answers.Body: <p>There should be a .tpl template file that goes along with your .php file. You can put the javascript in that file.</p>
  
  <p>The files created for your form via civix and their locations are described here:
  <a href="https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-form" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-form</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-11T20:18:44.513Z
Answers.Text: Well, I sort of made it work with $this->preventAjaxSubmit();
   in my php file for the form, but that reloads the entire page, not just the calling page.  Better than leaving old information there though.  I will look at putting that Javascript into the tpl file.  Thanks
Answers.UserDisplayName: Norm Dressler
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-10T17:07:08.207Z
Answers.LastActivityDate: 2018-11-10T17:07:08.207Z
Answers.UserDisplayName: Demerit
Body: <p>Wordpress with CiviCRM 5.3.2</p>
  
  <p>Hi guys, I'm struggling with a small problem.<br>
  I've added a tab (using tabset) to create a new tab while viewing a contact.
  That tab lists any dogs registered to that particular person.
  I've added an 'edit' and 'delete' link to the far right of the listing and all of that works.  I wrote a quickform that opens when the 'edit' link is clicked.  I can update the dog's information, click submit and it does update the entity in the database.  The issue is, how do I tell the parent of this edit popup to refresh?  The change I've made in the edit is not reflected in the listing until I reload the page manually.<br>
  I've read in a lot of places of some ways of doing it but I haven't figured out WHERE to initiate it.  In particular there is a CRM.refreshParent and/or the crmPopupFormSuccess.  I don't know where I would put these?  I used civix to create the basic form, then made modifications to the php file to do a preprocess and postprocess, of which does the update, etc.<br>
  So, how and where do I tell the parent page to refresh when I close the popup of the form? Some direction would be appreciated.</p>
  
  <p>Norm</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T17:09:18.147Z
Comments.Text: Sorry for the late response.  It was all done with coding in the extension.  It was not that difficult once you understand the format of the files.
Comments.UserDisplayName: Norm Dressler
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-19T17:42:09.157Z
Comments.Text: unrelated to your question, how did you go about creating the quickform and template? Did you build a new extension (civix, etc)? If not, what files need to be created and how are they called? I've done custom tabs and popups (no extensions, just using the hook as you did), but always calling standard Civi forms. I would like to create a custom form of my own and not sure what's the best method these days (not sure I want to create a whole new extension just for one small form). Thanks.
Comments.UserDisplayName: Paul B
Tags: <developer><civicrm-entity><civix><quickform>
Title: Development - Refresh of parent page
ThreadText: # Development - Refresh of parent page
  
  (Asked by: username_0 on 2018-11-09)
  
  Wordpress with CiviCRM 5.3.2
  
  Hi guys, I'm struggling with a small problem.  
  I've added a tab (using tabset) to create a new tab while viewing a contact.
  That tab lists any dogs registered to that particular person.
  I've added an 'edit' and 'delete' link to the far right of the listing and all of that works. I wrote a quickform that opens when the 'edit' link is clicked. I can update the dog's information, click submit and it does update the entity in the database. The issue is, how do I tell the parent of this edit popup to refresh? The change I've made in the edit is not reflected in the listing until I reload the page manually.  
  I've read in a lot of places of some ways of doing it but I haven't figured out WHERE to initiate it. In particular there is a CRM.refreshParent and/or the crmPopupFormSuccess. I don't know where I would put these? I used civix to create the basic form, then made modifications to the php file to do a preprocess and postprocess, of which does the update, etc.  
  So, how and where do I tell the parent page to refresh when I close the popup of the form? Some direction would be appreciated.
  
  Norm
  
  **Tags:** developer, civicrm-entity, civix, quickform
  
  > **Comments:**
  > **username_1**: unrelated to your question, how did you go about creating the quickform and template? Did you build a new extension (civix, etc)? If not, what files need to be created and how are they called? I've done custom tabs and popups (no extensions, just using the hook as you did), but always calling standard Civi forms. I would like to create a custom form of my own and not sure what's the best method these days (not sure I want to create a whole new extension just for one small form). Thanks.  
  > **username_0**: Sorry for the late response.  It was all done with coding in the extension.  It was not that difficult once you understand the format of the files.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-11-11. Score: 0 | Accepted answer
  
  Solved my issue with the code snippet which is mentioned here - <https://docs.civicrm.org/dev/en/latest/framework/ajax/> called CRM.livePage.js.
  I added it to my tpl file as suggested above and it now refreshes the tab I'm on!
  
  Thanks
  Norm
  
  
  ---
  
  ### Answer by username_2 on 2018-11-10. Score: 0
  
  There should be a .tpl template file that goes along with your .php file. You can put the javascript in that file.
  
  The files created for your form via civix and their locations are described here:
  <https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-form>
  
  > **Comments:**
  > **username_0**: Well, I sort of made it work with $this->preventAjaxSubmit();  in my php file for the form, but that reloads the entire page, not just the calling page.  Better than leaving old information there though.  I will look at putting that Javascript into the tpl file.  Thanks  
  
  ---
  
  