Hide Field in HTML but allow write access from JS

Dear Folks,

I am having an issue with a complete HTML/JS form that is being hosted on the web. The form has HTML Radio buttons to get around Lotus constraints of 8 columns, which I cannot avoid. Thus I have created a lotus field to include at the base of the form which I need to hide somehow.

I have tried multiple ways of doing this like using layers and hiding them. I have tried setting z-index=2 and setting white space overtop of it, but no matter what I do the fields remain in the forground.

I need a way to Hide the fields from view yet allow the browser to see the fields so I can right to them via JavaScript.

I have searched up and down in the Forums, but have been unable to locate something similar.

Please help, I have wasted an entire day on this already…

Subject: Hide Field in HTML but allow write access from JS

Have a notes field hidden with a hide when, then program your own field with pass-thru html. Both fields need the same name, and you can make your html field type=“hidden”, which will hide it from view, but you will still be able to access it with javascript. Any data you write to the field will get saved on the doc when sent back to the server. Is this what you mean?

Subject: RE: Hide Field in HTML but allow write access from JS

Yes this is what I need, I have tried this but the data has failed to write to the notes field…

The Javascript I am using is as follows:

function f_Submit()

{

questionoption = -1;

for (i=0;i<document.forms[0].Ques1A.length;i++)

{

 if (document.forms[0].Ques1A[i].checked) 

	{

	user_input = document.forms[0].Ques1A[i].value;

	questionoption = i;

	}

}

if ( questionoption == -1 )

{

alert("Please Make a Selection for Question 1a.");

return false;

}

document.forms[0].Question1A.value = user_input;

The Corresponding HTML is :

1

Please rate your understanding and comfort with the following sales tool:.

<IMG SRC=“http://dahdahdah.dah/media.nsf/filenamesview/greenpin.gif/$file/greenpin.gif”Some Form Tool

Not at all Comfortable &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Very Comfortable

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 1

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 2

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 3

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 4

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 5



The corresponding Notesfield is :

Text Field with HTML Attribute ’ type=“hidden”

The form is checked with “Render HTML Pass thru”

Content type - Notes

not check generate HTML for all fields ( tried both ways)

I have visible notes field currently when I hide them I error out as the JS cannot find the notesfields…

Please HELP>>>>>

Subject: RE: Hide Field in HTML but allow write access from JS

Can’t be bother to read your code! Do as I say and it will work fine as I have been changing forms to work in this way this week.

First, get that horrible setting “Generate HTML for all fields” OFF. Create a computed field in Notes, and hide it from the web browser. Since Generate HTML for all fields is off, this will NOT get sent to the browser. Now, create a hidden field in pass thru html, such as . Notice the computed text? In here, compute it to the hidden notes field. This will send the data from your notes field into the value of your self generated html field. Any data you write to this field using js, will also get sent back to the server and saved on the back end doc.

Hope this helps!!!

Subject: RE: Hide Field in HTML but allow write access from JS

hi Gwyn Howell,I have the same problem…Can u describe it elaborately,i mean step by step with example,so that it will be easy for us to do…

Thanx

Subject: RE: Hide Field in HTML but allow write access from JS

Hey Smruti,

I have got mine to work earlier today… It was kind of odd.

What I have is that my html field names and Notesfield names are matching exactly with case in mind.

The notesfields are checked Hide Paragraph when true with formula @IsNewDoc.

In the HTML Attribute I have TYPE=“HIDDEN”

Since I am using Radio Buttons I run through figure out which one is checked and fire its answer into the notes field as follows with JavaScript:

questionoption = -1;

for (i=0;i<document.forms[0].Ques1A.length;i++)

{

 if (document.forms[0].Ques1A[i].checked) 

	{

	user_input = document.forms[0].Ques1A[i].value;

	questionoption = i;

	}

}

if ( questionoption == -1 )

{

alert("Please Make a Selection for Question 1a.");

return false;

}

document.forms[0].Ques1A.value = user_input;

Comments box is as follows:

document.forms[0].comt.value = document.getElementById(‘comt’).value

HTH… as I had a heck of a time with it…

Subject: RE: Hide Field in HTML but allow write access from JS

Read my post, I have explained this in step-by-step detail.

Cheers

Subject: Alternate Soultion Hide Field in HTML but allow write access from JS

Hi,

Just add “style=display:‘none’” in the or in “HTML Attributes” tab in field property of the field you wish to hide…

eg:

<input type=“text” value=“value” name=“txt1” style=display:‘none’>

Regards

Rajiv

Subject: Hide Field in HTML but allow write access from JS

  1. Deselect the hide from web tick on the hide-when tab of the field.2. If the field is editable then select the field in designer, and in the “HTML Attributes” of the field type in “TYPE="HIDDEN"”

OR

  1. If the field is computed (still do step #1) and then put the following pass-thru html around the field.