You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I whipped up a read-only fields example, but was unable to get it working in the docker image linked from the main page (other things were broken, too...seemed like the image is out of date).
Here is the readonly.erb file I had created. I have exceeded the time I can spend trying to setup an environment to test it in :( Hopefully you can try it out and include in a future update?
<div class="example">
<h3>Read-only Inputs</h3>
<form id='readonly'>
<input type="checkbox" id="checkbox"> Text field is read-only</br>
<input type="text" id="textfield" value="I am editable">
</form>
</div>
<script>
var checkbox = form.getElementById('checkbox');
checkbox.onclick = function() {
var textfield = form.getElementById('textfield');
if (this.checked) {
textfield.setAttribute("readonly", "");
textfield.setAttribute("value", "You cannot change me");
}
else {
textfield.removeAttribute("readonly");
textfield.setAttribute("value", "I am editable");
}
}
</script>
The text was updated successfully, but these errors were encountered:
I whipped up a read-only fields example, but was unable to get it working in the docker image linked from the main page (other things were broken, too...seemed like the image is out of date).
Here is the readonly.erb file I had created. I have exceeded the time I can spend trying to setup an environment to test it in :( Hopefully you can try it out and include in a future update?
The text was updated successfully, but these errors were encountered: