Body: <p><a href="https://i.sstatic.net/DcXaN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DcXaN.png" alt="enter image description here"></a></p>
  
  <pre><code>{crmButton p='drupal/event-workflow/$uid/$gid' q="action=browse&amp;reset=1&amp;gid=$gid" icon="th-list"}{ts}Request for Approval{/ts}{/crmButton}
  </code></pre>
  
  <p>Where I have defined $uid and $gid variables in smarty template,
  How can I fix the the Unable to reach the server error, I checked the logs but there is no error with regards to this request,so I guess its something to do with button's <strong>q and p attributes</strong></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T05:22:44.783Z
Comments.Text: Make sure $uid and $gid are properly evaluated in the above line. For eg, I see the `p` assignment is done in single quotes. Try changing it to use double quote. eg `p="drupal/event-workflow/$uid/$gid"`
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T05:29:18.807Z
Comments.Text: Yes they are correct
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T05:29:34.197Z
Comments.Text: Opening it on new tab works
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T05:33:12.663Z
Comments.Text: Try adding `class="action-item"` attribute to the crmButton.
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T06:13:12.240Z
Comments.Text: ok, what does that do? can you elaborate it in an answer, what can we do to open it in a new tab? incase it does not help ? @jitendra-fuzion
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T15:01:09.350Z
Comments.Text: Can you please add the requirement, i guess you want to change form action based the user clicks on the button. Isn't?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T17:31:51.957Z
Comments.Text: Hi @PradeepNayak, I want to add create new drupal node programmatically once user clicks on the button
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T17:34:03.777Z
Comments.Text: to do that in the p , I am adding p="drupal/event-workflow/110/10 where 110 is coming from $gid and 10 is coming from $uid so its actually "drupal/event-workflow/$gid/$uid ,then I add hook_menu where I define this url drupal/event-workflow/110/10 but when i click on civicrm button it gives the error shown in the screenshot above @PradeepNayak
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T18:38:40.453Z
Comments.Text: Hi @jitendra-fuzion,can you explain on how I can add the class, I tried adding clas="action-item" as seen here:            {crmButton p="event-workflow/approve/$eventID/$uid" q="reset=1&action=update&id=$eventID&component=event" icon="th-list" class="action-item" }{ts} Approve{/ts}{/crmButton}
Comments.UserDisplayName: harshal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-16T18:53:17.810Z
Comments.Text: I added as shown in the above comment @jitendra-fuzion, but it does not help,looking forward for your feedback,thanks!
Comments.UserDisplayName: harshal
Tags: <drupal><smarty><button>
Title: I am adding crmButton in the template for EventInfo.tpl , how can I add drupal callback function and makesure it does not breaks as is the case here?
ThreadText: # I am adding crmButton in the template for EventInfo.tpl , how can I add drupal callback function and makesure it does not breaks as is the case here?
  
  (Asked by: username_0 on 2019-01-16)
  
  {crmButton p='drupal/event-workflow/$uid/$gid' q="action=browse&reset=1&gid=$gid" icon="th-list"}{ts}Request for Approval{/ts}{/crmButton}
  
  Where I have defined $uid and $gid variables in smarty template,
  How can I fix the the Unable to reach the server error, I checked the logs but there is no error with regards to this request,so I guess its something to do with button's q and p attributes
  
  **Tags:** drupal, smarty, button
  
  > **Comments:**
  > **username_1**: Make sure $uid and $gid are properly evaluated in the above line. For eg, I see the `p` assignment is done in single quotes. Try changing it to use double quote. eg `p="drupal/event-workflow/$uid/$gid"`  
  > **username_0**: Yes they are correct  
  > **username_0**: Opening it on new tab works  
  > **username_1**: Try adding `class="action-item"` attribute to the crmButton.  
  > **username_0**: ok, what does that do? can you elaborate it in an answer, what can we do to open it in a new tab? incase it does not help ? @jitendra-fuzion  
  > **username_2**: Can you please add the requirement, i guess you want to change form action based the user clicks on the button. Isn't?  
  > **username_0**: Hi @PradeepNayak, I want to add create new drupal node programmatically once user clicks on the button  
  > **username_0**: to do that in the p , I am adding p="drupal/event-workflow/110/10 where 110 is coming from $gid and 10 is coming from $uid so its actually "drupal/event-workflow/$gid/$uid ,then I add hook_menu where I define this url drupal/event-workflow/110/10 but when i click on civicrm button it gives the error shown in the screenshot above @PradeepNayak  
  > **username_0**: Hi @jitendra-fuzion,can you explain on how I can add the class, I tried adding clas="action-item" as seen here:            {crmButton p="event-workflow/approve/$eventID/$uid" q="reset=1&action=update&id=$eventID&component=event" icon="th-list" class="action-item" }{ts} Approve{/ts}{/crmButton}  
  > **username_0**: I added as shown in the above comment @jitendra-fuzion, but it does not help,looking forward for your feedback,thanks!  
  
  ---
  
  ## 0 answers
  
  