APPEND CUSTOM FIELDS FORMS AND FUNCTIONS

More
3 years 5 months ago #119917 by gbombonato
gbombonato created the topic: APPEND CUSTOM FIELDS FORMS AND FUNCTIONS
In a simple html form, i insert at Head one script containing several functions
At Body i create a form with several fields and some input fields, which call something like this: onClick="playAgain();"
Ok, Works fine
Function playAgain defined in my script is called when button is clicked

I can append code of that form to the end of a survey question page. Works fine.
I select "source" of any question and put the code there.

But function playAgain is not called when button is clicked
Where i must put script with functions to make buttons of added form have access to functions of my own script?

Can i insert one custom field inside limesurvey structure?
there is
<!-- START THE GROUP -->
...

<!-- PRESENT THE QUESTIONS -->
<div id="question642" class="numeric">
<table class="question-wrapper">
<tr>
<td class="questiontext">
<span class="qnumcode"> </span>texto q1<br /><span class="questionhelp"></span>

<span class="questionhelp" id="vmsg_642"><div id='vmsg_642_default' class='em_default emtip'>Apenas números podem ser usados nesse campo.</div>
</span>

</td>
</tr>
<tr>
<td class="answer">
<p class='question answer-item text-item numeric-item '> <label for='answer523946X80X642' class='hide label'>Resposta</label>
<input class='text numeric' type="text" size="10" name="523946X80X642" title="Apenas números podem ser usados nesse campo." id="answer523946X80X642" value="" onkeyup="fixnum_checkconditions(this.value, this.name, this.type,'onchange',0)" maxlength='20' />
</p>

</td>
</tr>
<tr>
<td class="survey-question-help">

</td>
</tr>
</table>
</div>

can i insert one custom field between limesurvey fields?
i tried some structure like above but nothing happened

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #119990 by tpartner
tpartner replied the topic: APPEND CUSTOM FIELDS FORMS AND FUNCTIONS
You would normally add page-specific JavaScript to the source of any question on the page - manual.limesurvey.org/Workarounds:_Manip....29_in_LimeSurvey.3F

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!