- Posts: 28
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to add custom css and js files
- LouisGac
- Visitor
7 years 8 months ago #142460
by LouisGac
Else, if you want to do it "native", you should check that all the id, values, names, classes, etc are correctly parsed.
Replied by LouisGac on topic How to add custom css and js files
A simple way to solve this kind of problem is to keep all the old inputs in a hidden div, and via JS to trigger a click on them when user click on your new input.Kevin wrote: Do you know what I am missing in the code that is not allowing it to save a value?
Else, if you want to do it "native", you should check that all the id, values, names, classes, etc are correctly parsed.
The topic has been locked.
- Kevin01
- Topic Author
- Offline
- Junior Member
Less
More
7 years 8 months ago #142472
by Kevin01
Replied by Kevin01 on topic How to add custom css and js files
Thanks.
The topic has been locked.
- LouisGac
- Visitor
7 years 8 months ago #142475
by LouisGac
there is a special button to thanks
did you get it working?
Replied by LouisGac on topic How to add custom css and js files
Kevin wrote: Thanks.
there is a special button to thanks
did you get it working?
The topic has been locked.
- Kevin01
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 1
7 years 8 months ago #142482
by Kevin01
Replied by Kevin01 on topic How to add custom css and js files
Not yet. The thanks button has a heart beside it so I was afraid to click on it
The topic has been locked.
- Kevin01
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 1
7 years 8 months ago - 7 years 8 months ago #142555
by Kevin01
Replied by Kevin01 on topic How to add custom css and js files
This works. Now I'll try to remove the Submit button and allow the selections to submit the value.
<div class="btn-block" data-bs-toggle="buttons">
<label class="btn btn-primary btn-block">
<input
class="radio"
type="radio"
value="<?php echo $code; ?>"
name="<?php echo $name; ?>"
id="answer<?php echo $name.$code; ?>"
<?php echo $checkedState;?>
onclick="if (document.getElementById('answer<?php echo $name; ?>othertext') != null) document.getElementById('answer<?php echo $name; ?>othertext').value='';checkconditions(this.value, this.name, this.type)"
aria-labelledby="label-answer<?php echo $name.$code; ?>"
/>
<label for="answer<?php echo $name.$code; ?>" class="control-label radio-label"></label>
<!--
The label text is provided inside a div,
so final user can add paragraph, div, or whatever he wants in the subquestion text
This field is related to the input thanks to attribute aria-labelledby
-->
<div class="label-text label-clickable" id="label-answer<?php echo $name.$code; ?>">
<?php echo $answer; ?>
</div>
</div>
<div class="btn-block" data-bs-toggle="buttons">
<label class="btn btn-primary btn-block">
<input
class="radio"
type="radio"
value="<?php echo $code; ?>"
name="<?php echo $name; ?>"
id="answer<?php echo $name.$code; ?>"
<?php echo $checkedState;?>
onclick="if (document.getElementById('answer<?php echo $name; ?>othertext') != null) document.getElementById('answer<?php echo $name; ?>othertext').value='';checkconditions(this.value, this.name, this.type)"
aria-labelledby="label-answer<?php echo $name.$code; ?>"
/>
<label for="answer<?php echo $name.$code; ?>" class="control-label radio-label"></label>
<!--
The label text is provided inside a div,
so final user can add paragraph, div, or whatever he wants in the subquestion text
This field is related to the input thanks to attribute aria-labelledby
-->
<div class="label-text label-clickable" id="label-answer<?php echo $name.$code; ?>">
<?php echo $answer; ?>
</div>
</div>
Attachments:
Last edit: 7 years 8 months ago by Kevin01.
The topic has been locked.
- Kevin01
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 1
7 years 8 months ago #143084
by Kevin01
Replied by Kevin01 on topic How to add custom css and js files
I found someone on upwork.com who was able to complete it. Thanks for your help.
Attachments:
The topic has been locked.