search for: hidden_field_tag

Displaying 20 results from an estimated 48 matches for "hidden_field_tag".

2007 Jun 28
1
complete stumper: variable exists in hidden_field_tag, but nil everywhere else
This is a real mystery to me. I have an instance variable in a partial that only gives its value inside a hidden_field_tag. If I try to use the variable anywhere else in the partial, i either get nil or an undefined error. The goal is to use the value of @event.id outside of hidden_field_tag. Here''s what works: <%= hidden_field_tag ''id'', @event && @event.id, :id => ''ev...
2009 Jan 10
2
hidden_field_tag flattens my array for value
ERB: <%= hidden_field_tag(''users_ids'', @users.collect(&:id))%> OUTPUT: <input id="users_ids" name="users_ids" type="hidden" value="12710152024252627303539414255577273747983859310110411712112712813213313614314916216917017718118418719019820020320520622322622722...
2006 Apr 05
2
Overring hidden_field_tag ?
Hi, I wonder how to override some tag generators, for example the hidden_field_tag function. By the way, I would be interested to learn how to extend ActionView::Base so new functions would be available to all my views (functions that need _erbout access, so a simple helper doesn''t...help) Thanks -- Posted via http://www.ruby-forum.com/.
2007 Oct 03
4
form_remote_tag :onsubmit not working.
..., :url => { :action => ''''}, :onsubmit => "set_tojid()", :after => "clearinput()" %> <%= text_field_tag :newmessage, nil, {:style => "width: 100%", :maxlength => "1000",:autocomplete => "off"} %> <%= hidden_field_tag :send_to, value = '''' %> <%= end_form_tag %> Anything buggy here?? TIA ~Shishir --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,...
2010 Aug 26
1
[PATCH] Adding the ability to select a Host to start a VM
...tart_vm_select', + :on_deselect => 'start_vm_deselect', + :on_hover => 'load_widget_hover', + :on_unhover => 'load_widget_unhover' + } %> + + <% form_tag do %> + <!--[form:start_vm]--> + <%= hidden_field_tag 'id', @vm.id %> + <%= hidden_field_tag 'vm_action', VmTask::ACTION_START_VM %> + Selected Migration Target: + <div id='selected_starting_host'> + <div class="selection_left"> + <div>No starting host selected...
2008 Oct 29
0
RJS problem after upgrading to Rails 2.0.2
...pleting your request, ''Missing type''." end else flash[:error] = "Please enter a valid amount." end end calculate_totals respond_to do |format| format.js end end new.rhtml <% form_tag do %> <%= hidden_field_tag :index, current_contracts_counter %> <%= hidden_field_tag :type, ''contract'' %> <%= text_field_tag :price, "", { :id => "contract_price_override_#{current_contracts_counter}" } %> <%= submit_to_remote(''u...
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
...ng it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div id="form_container"> <%= form_remote_tag :url => { :action => ''do_stuff'', :id => @stuff.id } %> <%= hidden_field_tag "info", @info %> <%= text_field_tag "input_here", "0", :size => ''5'' %> <input type="submit" value="DO_STUFF"> </form> </div> --- How would I modify the above ( if possible ) to add javascript to se...
2006 Jun 15
2
AJAX form inside table - error
...low, is a stripped down version of the code, which I have been trying. While calling the action the parameter, member_id is not passed. <table> <%= form_remote_tag(:url => {:controller => ''relationships'', :action => ''move''}) %> <%= hidden_field_tag ''member_id'',10 %> <tr> <td ></td> </tr> <%= submit_tag "Save", :class => "button" %> <%= end_form_tag %> </table> Thanks for your help. -- Surendra Singhi http://ssinghi.kreeti.com, http://www....
2006 Feb 11
1
Retaining multiple select values from action to action?
...which they are in this case, but that''s not the question): @things = [] params[:things].each { |thing| @things << Thing.find(thing) } That works fine. My question is this - params[:things] is a list of option values in some form. If I include this in target view 1: <%= hidden_field_tag "things[]", @params[:things] %> The value of @params[:things] in target action 2 is the value text concatenated together, which isn''t parseable as a distinct list the way it was in target action 1. In what form do the contents of the hidden variable need to be, in order to m...
2006 Feb 19
0
looking for more idiomatic way of doing this
...ittle div where the currently logged in member can vote: <div id="vote_div" class="vote"> Your vote: <% if @member_vote %> You have voted for this proposal<br /> <%= start_form_tag :action => "delete_vote" %> <%= hidden_field_tag :id, @proposal.id%> <%= submit_tag "Remove Vote", ''class'' => "button" %> <%= end_form_tag %> <% else %> <%= start_form_tag :action => "add_vote" %> <%= hidden_field_tag :id, @proposal.id%&gt...
2006 Feb 27
2
Multiple forms on a page
...uot;/images/vegetarian.gif", :class => "bevel", :size => "8x8") %></td> <% end -%> <td><%=h dish.summary -%></td> <td><%=h dish.price -%></td> <%= form_tag :action => :add_to_trolley -%> <td><%= hidden_field_tag("id", "#{dish.id}") -%><%= text_field_tag("fresh","", :size => "2", :value => "0" ) -%> <%= text_field_tag("frozen","", :size => "2", :value => "0") -%></td> <td...
2009 Feb 11
0
remote_form_for file_field strangeness
Does anyone see any problem with this form? - form_remote_for(Photo.new, :html => {:multipart => true, :target => :uploader}) do |f| .form_element = f.label :photo = f.file_field :collateral = hidden_field_tag :container_id, @shoot.id = hidden_field_tag :container_type, @shoot.class.name .form_element = f.submit ''Add Photos'' The photo has a paperclip attachment called collateral, and a double polymorphic relation with container (which can be a shoot, model or photographer)....
2010 Feb 07
0
Authlogic Oauth problem with Remember Me
...tter''s login/registration, instead of having a "login with Twitter" button on my page. That works so far, using a new view like this: <html> <body> <% form_tag(user_session_path, :method => :post, :id => ''new_user_session'') do %> <%= hidden_field_tag ''login_with_oauth'', ''Login with Twitter'' %> <% end %> <script type="text/javascript"> var e = document.getElementById("new_user_session"); e.submit(); </script> </body> </html> I''m trying to get Remem...
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following message: ActionView::TemplateError: Missing template /_captcha.erb in view path app/views:test/vendor/plugins/brain_buster/views/brain_busters On line #23 of app/views/contacts/_form.html.erb 20: <%= f.label :message %><br /> 21: <%= f.text_area :message %> 22:
2006 Mar 16
9
Help needed on STI syntax
Struggling a little with getting the syntax right for a STI model. Prob just being a bit dense. Couple of questions I''m hoping you guys can answer: Assume here I''ve got: class Person class Manager < Person class Slave < Person 1) How does person[:type] differ from person.type when type is the column used to specify the subclass. They seem to output the same
2006 Jul 14
3
compare two tables and find the difference?
...</th> <th>Classification level</th> <%= render :partial => ''charge'', :collection => @new_charges %> </table> <%= submit_tag ''Save'' %> <%= end_form_tag %> the partial _charge.rhtml: <tr> <td><%= hidden_field_tag "charge[#{charge_counter}][charge_id_number]", charge.charge_id_number %><%= charge.charge_id_number %></td> <td><%= text_field_tag "charge[#{charge_counter}][name]", charge.charge_name, :size => 50 %></td> <td><%= collection_s...
2008 Oct 18
5
render :update / page.replace_html problem
Hi there, I have this ajax problem, I''m desparately trying to debug since 1 entire day now: The Controller includes: ======================== [...] render :update do |page| page.replace_html ''coverletter_part'', :partial => ''user/applicationfiles/coverletter_part'' end [...] The View includes: ================== [...] <div
2010 Sep 01
1
[PATCH 1/3] Adding the VM Pool migration for vms
...;change_vmpool_form" action="<%= url_for :action => 'update_vmpool' %>"> + <div class="dialog_form"> + <%= error_messages_for 'change_vmpool' %> + + <% form_tag do %> + <!--[form:change_vmpool]--> + <%= hidden_field_tag 'id', @vm.id, :id => 'vm_id' %> + <%= label "vm", "vm_resource_pool_id", "Select the pool to migrate to" %> + <%= select "vm", "vm_resource_pool_id", @vm_pools.map { |pool| [pool.name, pool.id] } %> + &...
2006 Jul 17
0
collection_select help
...me</th> <th>Classification level</th> <%= render :partial => ''charge'', :collection => @charges %> </table> <%= submit_tag ''Save'' %> <%= end_form_tag %> the partial - _charge.rhtml: <tr> <td><%= hidden_field_tag "charge[#{charge_counter}][charge_id_number]", charge.charge_id_number %><%= charge.charge_id_number %></td> <td><%= text_field_tag "charge[#{charge_counter}][name]", charge.charge_name, :size => 50 %></td> <td><select id = &qu...
2006 Jul 27
0
CRUD, REST and associations
...arate views. So, within the editing form (_form.rhtml when spit out by the scaffold generator), I display a table of checkboxes and magazines where subscriptions are shown and can''t be changed. <!-- hidden field, to get a request param, even if no checkbox is selected --> <%= hidden_field_tag reader[magazine_ids][]'', '''' %> <table> <tr> <td></td> </tr> <% for magazine in reader.magazines %> <tr> <td><%= check_box_tag ''reader[magazine_ids][]'', magazine.id, @reade...