similar to: passing a value in a hidden field inside a form

Displaying 20 results from an estimated 1000 matches similar to: "passing a value in a hidden field inside a form"

2006 Jun 04
0
RE: Rails Digest, Vol 21, Issue 64
> From: Craig White <craigwhite@azapple.com> > Subject: [Rails] passing a value in a hidden field inside a form > To: rails@lists.rubyonrails.org > Mesdosage-ID: <1149428769.713.5.camel@lin-workstation.azapple.com> > Content-Type: text/plain > > should be trivial but I can''t figure this out from api > > <%= hidden_field
2006 May 29
5
Find last
This seems rather ugly. I am thinking that this needs to be in the model but I am looking to obtain the date for a tb test... >> @tb = Innoculation.find(:all, :conditions => ["personnel_id = 1 AND innoc_type = ''TB''"], :order => ''innoc_date DESC'') => [#<Innoculation:0xb77ed234 @attributes={"id"=>"1",
2006 May 23
3
Pagination problem
hi everybody, i am new to rails.. plz clear my doubt... this is my question In my table(public_topics), i have 11 rows of data.. whenever i run the following view, it shows the entire rows in the current page.. and i have set the '':per_page'' option to ''2''.so it must show two data per page..but it shows all the rows in a single page..and this case continue
2006 Jul 08
4
Hidden fields in forms
Please can someone show me the correct syntax for a hidden field in forms, this is my code <%= start_form_tag :action => ''create'' %> <div class="form1"> <table width="auto" boader="8" cellspacing="5" cellpadding="5"> <% hidden_field ''line_item'', ''client_id'', :value
2008 Jul 07
3
How to get a users screen name into a hidden field in a PostsController action?
Instead of the user entering a name, I want to pass their screen name along with supplied :title and :content fields. here is what I''ve got.. f.hidden_field :author, user.screen_name here is the create method from Posts controller: def create @title = "Gravity" @user = User.find(params[:id]) # this does not work, and I don''t know why if request.post?
2006 Jun 18
5
on change of drop down showing a new textfield
hi, i have a situation where i have a list of options from which a user selects his options if its not in the list he/she selects Others/Not Present and a new textfield should pop up and the data entered there should be considered instead of dropdown. i have done this using javascript/dhtml but i was wondering how this can be done using pure rails i.e using some of the RoR apis?. i would
2007 Sep 22
1
Rails newbie: passing a value to hidden form field, then getting it
Warning: I am as green as #00FF00 with rails :-) I have an rhtml view that shows a survey: /views/survey/show.rhtml. I have a Survey model, helper and controller. I''m using the acts_as_commentable plugin to collect comments, and trying to save user comments from users who have taken a survey (don''t ask -- it''s just a test). To save the comment, I need the id of the
2010 Apr 12
3
$(link).previous("input[type=hidden]") is undefined
I am getting this error when trying to use the remove link explained in the Railscast: http://railscasts.com/episodes/197-nested-model-form-part-2 error: $(link).previous("input[type=hidden]") is undefined remove_fields()applic...1065175 (line 6) function onclick(event) { remove_fields(this); return false; }()1 (line 2) [Break on this error]
2006 Mar 10
2
Syntax for <input type=hidden> in rhtml????
Hi, I am new to ROR. PLease tell me what is syntax of creating hidden field in form inside RHTML file. I knonw the syntax for text box (<%= text_field ''product_item'',''product_id'', :value=>product.id%>) But I don''t know syntax for hidden field(like <input type=hidden> in HTML). Please tell me. Thanx in advance. Prash -- Posted via
2009 Sep 18
3
Error: length(f1) == length(f2) is not TRUE
Dear R users, I am trying to fit an lmer model with only random effects which is giving me the following error: Error : length(f1) == length(f2) is not TRUE In addition: Warning messages: 1: In P1L55:family : numerical expression has 390 elements: only the first used 2: In P1L55:family : numerical expression has 390 elements: only the first used I am trying to extract variance components
2009 Sep 21
4
Working around 256 byte variable names? + trouble opening large file
Dear R users, I am trying to read in a file with 105 columns, and when trying to attach it, get an error as follows: > vc1<-read.table("P:\\R\\Everything-I.txt", header=T, sep=" ", dec=".", na.strings=NA, strip.white=T) > attach(vc1) Error in attach(vc1) : variable names are limited to 256 bytes Is there a way to get around this, and make R accept the
2009 Nov 16
3
lapply() not converting columns to factors (no error message)
Dear List, I'm having a curious problem with lapply(). I've used it before to convert a subset of columns in my dataframe, to factors, and its worked. But now, on re-running the identical code as before it just doesn't convert the columns into factors at all. As far as I can see I've done nothing different, and its strange that it shouldn't do the action. Has anybody
2009 Jul 15
2
Differing Variable Length Inconsistencies in Random Effects/Regression Models
Dear All, I am quite new to R and am having a problem trying to run a linear model with random effects/ a regression- with particular regard to my variable lengths being different and the models refusing to compute any further. The codes I have been using are as follows: vc<-read.table("P:\\R\\Testvcomp10.txt",header=T) >> attach(vc) > > family<-factor(family) >
2012 Jan 20
3
Fields_for adding html (text) for hidden field
Hello all, I''m getting this weird ''<input name value=''2'' type=''hidden'' />'' text printed out in my form. See attached image. I''ve spent too much time trying to figure it out already and it''s not going to stop me from moving on for now. As you can see it''s still very early on. I''m using
2006 Aug 07
2
related to forms
I''m trying to construct a form that would request a page using GET and would like my variables to be simple like q,v, etc so that the URL it calls is something like: /controller/action?q=80&v=100 However, I''m having trouble using the basic form helpers (probably doing something wrong) cos expressions such as: <%= hidden_field "q", "v", {:value
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that result in an ajax call that updates two sections on the page. Here is the code in the controller def create ... render :update do |page| page.replace_html ''list_items'', :partial => ''lists/list_items'' page.replace_html ''add_item'', :partial =>
2006 May 23
1
Re: Wierd pagination problem - Unknown options:
> Unfortunately I still get the same error. Here is my code now (the > commented line works): > > def list > @upload_pages, @uploads = paginate(:uploads, :per_page => > 20, :order > => ''id'') > # @upload_pages, @uploads = paginate(:uploads, :per_page => 20) > end You may have an older version, try using the order_by clause
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
Dear List, I need to print out each of 'k' levels of a factor 'n' times each, where 'n' is the number of elements belonging to each factor. I know that this can normally be done using the gl() command, but in my case, each level 'k' has an unequal number of elements. Example with code is as below: vc<-read.table("P:\\Transit\\CORRECT
2006 Jul 12
7
Failure in comparisons
I''m basically a Ruby noobie. At the moment I''m having a fair bit of trouble trying to figure out what''s going wrong here (partial template): <%= @project = Project.find(@the_id) if current_user.userid == @project.client hidden_field ''messages'', ''recipient'', ''value'' => @project.project_manager
2009 Nov 19
1
Splitting massive output into multiple text files
Dear List, I thought it would be much easier to put a second query into a second mail. I need to print 426*10000 blocks of variance components data, where 426 is the number of columns of data that have 10000 permutations of variance generated for each of them. I have tried printing out a smaller number of permutations for a smaller number of markers and that has worked. However, since a