Ron - Monday, June 25, 2007 1:40 PM:
I have added two radio buttons to a form and while in the edit mode the radio buttons have the desired look with a white filled circle, but in the non-edit mode the radio buttons are shaded the same color as the background color making it hard to see.
I would like to see the radio buttons displayed the same way in the view mode as it is in the edit mode, is there a way to do this?
Thanks
Ron
SamsAn - Tuesday, June 26, 2007 8:27 AM:
Hi.It happens because of the corresponding inputs (type=radio) has disabled=true in view mode.
I offer to hide the radio buttons and display some appropriate html instead of the buttons in View mode. You may make the following to have this behavior.
1. Edit your form and create new field (Field Type=HTML) with the Html Code like this:
<script>
document.write("<SPAN id=id_of_the_faked_span><INPUT type=radio value="value_1" checked>Label 1<INPUT type=radio value="value_2">Label 2</SPAN>");
</script>
2. For the added field, set the same Field Label, Field Physical params (X, Y, etc.) as in original radio button list.
3. Create new Form Event (Event = OnFormPopulated) with a method (Method Type=JavaScript) having the code like below:
//+++++++++++++++++++
var originalSpanId = "45CB9756BD6F4564910046F4704A3CA6span";
var fakedSpanId = "A7762ED2F9DC4F1FBD0CE2B8C00D0A64span";
var spn = document.getElementById(originalSpanId);
var fakedSpan = document.getElementById(fakedSpanId);
if (document.isEditMode)
{
spn.style.display = "inline";
fakedSpan.style.display = "none"
}
else
{
spn.style.display = "none";
fakedSpan.style.display = "inline"
}
//---------------------
4. Enjoy.