23 February 2009 at 8:52pm
Is there a global variable that I can check which will notify me if I am in a control loop so that I can modify IDs in the code behind (php files) as I would like to append the control's position (ie 1,2,3,....) to the end of the attribute.
For exampe if I have a calendar called FromDate and this is in to be displayed in a control loop, the ID should rather be FormName_FromDate1, FormName_FromDate2, etc, etc
23 February 2009 at 10:14pm
Thanks - yes I have seen this before. This could work to a point but is there no way to rather do it in the actual PHP class by using a variable such as $Pos rather than in the template or will this also work in the code behinds?
28 February 2009 at 5:07am
Basically I have a function called MyFunc and in the template I want to be able to make a calendar unique on a form which is in a control. If a click the calendar or use some AJAX thingy it will not work. So this is what the code is:
<% control Event %>
<% end_control %>
PS: I just posted an update to Sapphire on Trac. Hopefully the fix I just submitted will allow for this to work since I can't see any other way for it to work. My fix allows a dynamic parameter to be passed into a function via the template. So, you can have: $Top.CalendarForm($ID)