Involver Developer Network : contest_form_link
This page last changed on Jun 07, 2012 by louis.salin@involver.com.
contest_form_linkAttributes
The contest_form_link is used to create a link that calls the contest entry form partial and, on completion of the form, loads the success partial. It is a critical piece of the contest Feature Block without which the block will not function. Our system is built so that if you change the fields in your contest part way through the contest the data fields being exported will intelligently update to the new form configuration. In order to make that work our system scans the entry form in your tab before running export. This means that all contest feature blocks must have a contest_form_link tag properly configured and in place in order for data export of the contest entries to work. Without it our system won't be able to recognize the form and thus won't able to scan and complete the data export. Typical Use-CaseIn most scenarios the contest_form_link is used very straightforwardly. {% contest_form_link entry_form_partial:'entry_form' success_partial:'success' %} Text of Link goes Here {% endcontest_form_link %} Will launch the entry form in a Jquery dialog box and is the default configuration. The contest_form_link tag simply replaces the anchor tag that you would normally wrap around your link text. If you want the form to appear inline in a div instead of in a popup, add the div_id attribute like so: {% contest_form_link entry_form_partial:'entry_form' success_partial:'success' div_id:'entry_form_display' %}
Text of Link goes Here
{% endcontest_form_link %}
<div id="entry_form_display"></div>
Firing Javascript from the contest_form_linkThe contest_form_link tag does not currently include an onclick attribute that would allow you to hook javascript onto it directly. Instead, you can wrap the link in a css id and fire your javascript remotely when someone clicks on the link. <div id="contestlink"> {% contest_form_link entry_form_partial:'entry_form' success_partial:'success' %} Text of Link goes Here {% endcontest_form_link %} </div> <script type="text/javascript"> $(document).ready(function() { $("#contestlink").click(function() { Function Goes Here }; }; </script> Related Topics |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |