Programming a Row-wise Radio Grid with one column having 'specify' text box.

Hi,

Let me break my problems into 2 parts.

What I need:

1. There is a row-wise radio grid.

  1. If for any row , 6th column is selected then I need to provide a Please Specify text box.

  2. I can't convert it into a column-wise grid, nor I can switch to checkboxes.

What I have done:

  1. Created a Free format question below it, and created a textbox variable in it corresponding to each row. Then hid this question.

  2. Inside the grid I implemented the following logic, inside a loop over the rows.

    $('.grid_r' + arr[i] + ".grid_c6").append( $("#Q17Hid_other" + arr[i] ) );

where arr is ListValuesArray of rows.

  1. Then just using CustomGraphicalRadiobox, show and hide these appended textboxes. This is working and also storing the data values.

    1. function SSI_CustomGraphicalRadiobox(GraphicalRadioboxObj, InputObj)
      
      		{
      			var row_n = Number(InputObj.name.split('r')[1]);
      			if(Number(InputObj.value) === 6)
      			{
                     if ($("#Q17Hid_other" + row_n).is(":hidden")) {
      					
          				$("#Q17Hid_other" + row_n).show();
      				}
      				
      			
      
      			}else{
      				
      				if($("#Q17Hid_other" + row_n).is(":visible")){
      					
      					$("#Q17Hid_other" + row_n).val('');
      					$("#Q17Hid_other" + row_n).hide();
      				}
      				
      			}
      }

The problem is these appended text boxes are not allowing 'space'.

I checked even the keydown/keypress event is not being thrown for space bar. Is the space key being prevented in the SSI script working on the grid?

Is there a way out here?

If Not, what alternative solution could be tried? Maybe there is an easier way that has not clicked to me yet.

Any guidance would be helpful. Thanks in advance. Please help.

1 reply