-
Notifications
You must be signed in to change notification settings - Fork 987
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: added view for list_dropdown other option.
- Loading branch information
LouisGac
committed
Mar 22, 2016
1 parent
516e852
commit 20dd6bc
Showing
2 changed files
with
50 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
application/views/survey/questions/list_dropdown/othertext.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* List DropDown, Other Option | ||
* | ||
* @var $name $ia[1] | ||
* @var $display | ||
* @var $value | ||
* @var $checkconditionFunction | ||
*/ | ||
?> | ||
<script type="text/javascript"> | ||
<!-- | ||
function showhideother(name, value) | ||
{ | ||
var hiddenothername='othertext'+name; | ||
if (value == "-oth-") | ||
{ | ||
document.getElementById(hiddenothername).style.display=''; | ||
document.getElementById(hiddenothername).focus(); | ||
} | ||
else | ||
{ | ||
document.getElementById(hiddenothername).style.display='none'; | ||
document.getElementById(hiddenothername).value='' // reset othercomment fiel | ||
} | ||
} | ||
--> | ||
</script> | ||
|
||
<input | ||
class="form-control" | ||
type="text" | ||
id="othertext<?php echo $name; ?>" | ||
name="<?php echo $name; ?>other" | ||
style='<?php echo $display; ?>' | ||
value='<?php echo $value?>' | ||
alt='<?php eT('Other answer'); ?>' | ||
onchange='<?php echo $checkconditionFunction;?>(this.value, this.name, this.type);' | ||
/> |