Answers.Body: <p>Resolved this issue by using:</p>
  <pre><code>&lt;td&gt;&lt;a href=&quot;{crmURL p='civicrm/EditComponent' q='reset=1&amp;action=update&amp;id=2'}&quot; class=&quot;crm-popup&quot;&gt; Edit &lt;/a&gt;&lt;a href=&quot;javascript:deleteComponent({$component.id})&quot;&gt; Delete &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-28T20:48:26.987Z
Answers.LastActivityDate: 2021-05-28T20:48:26.987Z
Answers.UserDisplayName: Norm Dressler
Body: <p>I have an extension that adds a tab to Events.  The form is called up, and works using the automatic layout for the top piece.</p>
  <pre><code> {foreach from=$elementNames item=elementName}
       &lt;div class=&quot;crm-section&quot;&gt;
       &lt;div class=&quot;label&quot;&gt;{$form.$elementName.label}&lt;/div&gt;
       &lt;div class=&quot;content&quot;&gt;{$form.$elementName.html}&lt;/div&gt;
       &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;   &lt;/div&gt; {/foreach}
  </code></pre>
  <p>Further down I add more to this form:</p>
  <pre><code>/script&gt;
  {/literal}
  &lt;table border='1' cellpadding='5' cellspacing='5'&gt;&lt;tr class=&quot;crm-entity&quot; id=&quot;TrialComponents&quot; style='border-bottom: 1px solid black'&gt;&lt;th&gt;id&lt;/th&gt;&lt;th&gt;Event ID&lt;/th&gt;&lt;th&gt;Trial Number&lt;/th&gt;&lt;th&gt;Trial Date&lt;/th&gt;&lt;th&gt;Judge&lt;/th&gt;&lt;th&gt;Started&lt;/th&gt;&lt;th&gt;Advanced&lt;/th&gt;&lt;th&gt;Excellent&lt;/th&gt;&lt;th&gt;Elite Offered&lt;/th&gt;&lt;th&gt;Games&lt;/th&gt;&lt;/tr&gt;
  
  {crmAPI var='result' entity='TrialComponents' action='get' event_id = $event_id}
  {foreach from=$result.values item=component}
  &lt;td&gt;{$component.id}&lt;/td&gt;
  &lt;td&gt;{$component.event_id}&lt;/td&gt;
  &lt;td&gt;{$component.trial_number}&lt;/td&gt;
  &lt;td&gt;{$component.trial_date}&lt;/td&gt;
  &lt;td&gt;{$component.judge}&lt;/td&gt;
  &lt;td&gt;{$component.started_components}&lt;/td&gt;
  &lt;td&gt;{$component.advanced_components}&lt;/td&gt;
  &lt;td&gt;{$component.excellent_components}&lt;/td&gt;
  &lt;td&gt;{$component.elite_offered}&lt;/td&gt;
  &lt;td&gt;{$component.games_components}&lt;/td&gt;
  &lt;td&gt;&lt;a href=&quot;{$url}&amp;reset=1&amp;action=update&amp;id={$component.id}&quot; class=&quot;crm-popup&quot;&gt; Edit &lt;/a&gt;&lt;a href=&quot;javascript:deleteComponent({$component.id})&quot;&gt; Delete &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
  {/foreach}
  &lt;a title=&quot;Add a Component&quot; class=&quot;button_name button crm-popup&quot; href=&quot;{$url}?reset=1&amp;action=add&amp;id={$event_id}&quot;&gt;
    &lt;span&gt;Add Component&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  <p>The idea here is I have a one to multi so this second bit lists out the component section, and I have an Edit and a Delete function associated with each line.  The Delete works fine but its the href that does not.  I have a second form in this extension called EditComponent, which I want to call and put in the popup window that gets produced when you hit the edit or Add Component.  The issue is I'm getting a 404 error and it can't find that form?  What URL should I be using in there to get that other form in the popup?  My extension is called TrialAdmin and the two forms are called TrialDetails and EditComponent, both in the same directory of the extension.  I think I'm just too tired to think this one through -- help?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-28T08:37:01.790Z
Comments.Text: Is your extension available on lab or github?  Sometimes easier to try it!
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-28T12:53:35.647Z
Comments.Text: No it's not - very specialized and specific to our dog association.  I can upload it though.
Comments.UserDisplayName: Norm Dressler
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-28T14:02:51.143Z
Comments.Text: Ok, I needed to get some code control going so I have uploaded it to Github.   https://github.com/cub69/ca.sdda.trialadmin/tree/master
Comments.UserDisplayName: Norm Dressler
Tags: <extension><quickform>
Title: Forms Question -- href issue
ThreadText: # Forms Question -- href issue
  
  (Asked by: username_0 on 2021-05-28)
  
  I have an extension that adds a tab to Events.  The form is called up, and works using the automatic layout for the top piece.
   {foreach from=$elementNames item=elementName}
       
       {$form.$elementName.label}
       {$form.$elementName.html}
           {/foreach}
  
  Further down I add more to this form:
  /script>
  {/literal}
  idEvent IDTrial NumberTrial DateJudgeStartedAdvancedExcellentElite OfferedGames
  
  {crmAPI var='result' entity='TrialComponents' action='get' event_id = $event_id}
  {foreach from=$result.values item=component}
  {$component.id}
  {$component.event_id}
  {$component.trial_number}
  {$component.trial_date}
  {$component.judge}
  {$component.started_components}
  {$component.advanced_components}
  {$component.excellent_components}
  {$component.elite_offered}
  {$component.games_components}
   Edit  Delete 
  {/foreach}
  
    Add Component
  
  
  The idea here is I have a one to multi so this second bit lists out the component section, and I have an Edit and a Delete function associated with each line.  The Delete works fine but its the href that does not.  I have a second form in this extension called EditComponent, which I want to call and put in the popup window that gets produced when you hit the edit or Add Component.  The issue is I'm getting a 404 error and it can't find that form?  What URL should I be using in there to get that other form in the popup?  My extension is called TrialAdmin and the two forms are called TrialDetails and EditComponent, both in the same directory of the extension.  I think I'm just too tired to think this one through -- help?
  
  **Tags:** extension, quickform
  
  > **Comments:**
  > **username_1**: Is your extension available on lab or github?  Sometimes easier to try it!  
  > **username_0**: No it's not - very specialized and specific to our dog association.  I can upload it though.  
  > **username_0**: Ok, I needed to get some code control going so I have uploaded it to Github.   https://github.com/cub69/ca.sdda.trialadmin/tree/master  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-05-28. Score: 2 | Accepted answer
  
  Resolved this issue by using:
   Edit  Delete
  
  
  ---
  
  