Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Is there any way to create text fields based on the javascript variable
in a model popup receiving a variable as question type id as '$('#subquestion').val()' based on this value the model popup content have to create
<%@lg = Language.all %>
<% @qs_type = Question.find( javascript value ).question_type %>
<% @lg.each do |n| %>
if ( @qs_type == 11)
matchingtype question two textbox
<%= text_area %>
<%= text_area %>
elsif @qs_type == 3
mutiple choice one textbox.
<%= text_area %>
<% end %>
is there any way to do this ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment