Re: multi-line input field
textarea rows:'5' @testform.testing doesn't do what you want it to do? On Mon, May 12, 2014 at 1:51 AM, Sebastjan Hribar sebastjan.hri...@gmail.com wrote: Hi, can someone tell me if multi-line input field is possible to do with markaby? If I use input tag like so: --- input type: 'textarea', name: 'testing', value: @testform.testing --- I can only set the length of the field by providing the size: attribute. If I use textarea tag like so: --- textarea @testform.testing --- it only make sense for displaying the value. I'd like to accomplish multi-line input field. The purpose of such a text box is to enter a bit longer comments. Can it be done? regards, seba ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list -- Dave ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
Hi, I can only use textarea rows:'5' @testform.testing for displaying pruposes. As soon as I use tag input which I need for saving the data to the database table, multiline is impossible. regards, seba 2014-05-12 13:39 GMT+02:00 David Susco dsu...@gmail.com: textarea rows:'5' @testform.testing doesn't do what you want it to do? On Mon, May 12, 2014 at 1:51 AM, Sebastjan Hribar sebastjan.hri...@gmail.com wrote: Hi, can someone tell me if multi-line input field is possible to do with markaby? If I use input tag like so: --- input type: 'textarea', name: 'testing', value: @testform.testing --- I can only set the length of the field by providing the size: attribute. If I use textarea tag like so: --- textarea @testform.testing --- it only make sense for displaying the value. I'd like to accomplish multi-line input field. The purpose of such a text box is to enter a bit longer comments. Can it be done? regards, seba ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list -- Dave ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
textareas are also submitted together with the form, you just need to set a name: textarea @testform.testing, rows:5, name:'testing' On Monday, May 12, 2014, Sebastjan Hribar sebastjan.hri...@gmail.com wrote: Hi, I can only use textarea rows:'5' @testform.testing for displaying pruposes. As soon as I use tag input which I need for saving the data to the database table, multiline is impossible. regards, seba 2014-05-12 13:39 GMT+02:00 David Susco dsu...@gmail.comjavascript:_e(%7B%7D,'cvml','dsu...@gmail.com'); : textarea rows:'5' @testform.testing doesn't do what you want it to do? On Mon, May 12, 2014 at 1:51 AM, Sebastjan Hribar sebastjan.hri...@gmail.comjavascript:_e(%7B%7D,'cvml','sebastjan.hri...@gmail.com'); wrote: Hi, can someone tell me if multi-line input field is possible to do with markaby? If I use input tag like so: --- input type: 'textarea', name: 'testing', value: @testform.testing --- I can only set the length of the field by providing the size: attribute. If I use textarea tag like so: --- textarea @testform.testing --- it only make sense for displaying the value. I'd like to accomplish multi-line input field. The purpose of such a text box is to enter a bit longer comments. Can it be done? regards, seba ___ Camping-list mailing list Camping-list@rubyforge.orgjavascript:_e(%7B%7D,'cvml','Camping-list@rubyforge.org'); http://rubyforge.org/mailman/listinfo/camping-list -- Dave ___ Camping-list mailing list Camping-list@rubyforge.orgjavascript:_e(%7B%7D,'cvml','Camping-list@rubyforge.org'); http://rubyforge.org/mailman/listinfo/camping-list -- // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
On Mon, 12 May 2014 14:49:33 +0200, Sebastjan Hribar sebastjan.hri...@gmail.com wrote: I can only use textarea rows:'5' @testform.testing for displaying pruposes. Why? textarea is the way to do multiline text inputs in HTML. -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
Here was my mistake: I thought that in order for setting the model attribute data like so: common_attributes = {title: input.title, ..., general_remark: input.general_remark} I have to explicitly state the input tag in the form like so: input textarea @reviewform.general_remark, rows: 5, name: 'general_remark' and this produced the error about tag not allowing the content. 3. Otherwise, I used it like so: input type: 'textarea', name: 'suggestions_reviewer_comments', value: @reviewform.suggestions_reviewer_comments And this didn't produce any errors, but on the other hand the field in the form had the same appearance as the 'text' field. Thank you again. regards, seba On 12. 05. 2014 15:45, Sebastjan Hribar wrote: My assumption was based on the behavior of my form in my app. I'll test the way magnus wrote it and I'll post back here later today so I won't make any false statements. In order to capture the data I always used the input tag and that didn't allow for multiple line textarea. regards, seba 2014-05-12 15:08 GMT+02:00 Bartosz Dziewoński matma@gmail.com mailto:matma@gmail.com: On Mon, 12 May 2014 14:49:33 +0200, Sebastjan Hribar sebastjan.hri...@gmail.com mailto:sebastjan.hri...@gmail.com wrote: I can only use textarea rows:'5' @testform.testing for displaying pruposes. Why? textarea is the way to do multiline text inputs in HTML. -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
But textarea isn't unknown or unspecified type, right? On 12. 05. 2014 18:19, Bluebie wrote: All web browsers will treat any unknown or unspecified type of input as being a text input. This is why we can have things like input type=email and it doesn't destroy everything :) --- Bluebie On Tuesday, 13 May 2014 at 1:57 am, Sebastjan Hribar wrote: Here was my mistake: I thought that in order for setting the model attribute data like so: common_attributes = {title: input.title, ..., general_remark: input.general_remark} I have to explicitly state the input tag in the form like so: input textarea @reviewform.general_remark, rows: 5, name: 'general_remark' and this produced the error about tag not allowing the content. 3. Otherwise, I used it like so: input type: 'textarea', name: 'suggestions_reviewer_comments', value: @reviewform.suggestions_reviewer_comments And this didn't produce any errors, but on the other hand the field in the form had the same appearance as the 'text' field. Thank you again. regards, seba On 12. 05. 2014 15:45, Sebastjan Hribar wrote: My assumption was based on the behavior of my form in my app. I'll test the way magnus wrote it and I'll post back here later today so I won't make any false statements. In order to capture the data I always used the input tag and that didn't allow for multiple line textarea. regards, seba 2014-05-12 15:08 GMT+02:00 Bartosz Dziewon'ski matma@gmail.com mailto:matma@gmail.com: On Mon, 12 May 2014 14:49:33 +0200, Sebastjan Hribar sebastjan.hri...@gmail.com mailto:sebastjan.hri...@gmail.com wrote: I can only use textarea rows:'5' @testform.testing for displaying pruposes. Why? textarea is the way to do multiline text inputs in HTML. -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
textarea’s are made using the textarea tag. There is no such thing as input type=“textarea”. Maybe this comes from rails or something? In markaby unless you’ve created some helpers to do otherwise, it outputs whatever you write in your code - a call to input() wont be transformed in to a textarea or a button or any other kind of form element. Markaby really is just a way of writing html, using ruby syntax instead of xml/sgml, and not much more. — Bluebie On Tuesday, 13 May 2014 at 3:34 am, Sebastjan Hribar wrote: But textarea isn't unknown or unspecified type, right? On 12. 05. 2014 18:19, Bluebie wrote: All web browsers will treat any unknown or unspecified “type” of input as being a text input. This is why we can have things like input type=“email” and it doesn’t destroy everything :) — Bluebie On Tuesday, 13 May 2014 at 1:57 am, Sebastjan Hribar wrote: Here was my mistake: I thought that in order for setting the model attribute data like so: common_attributes = {title: input.title, ..., general_remark: input.general_remark} I have to explicitly state the input tag in the form like so: input textarea @reviewform.general_remark, rows: 5, name: 'general_remark' and this produced the error about tag not allowing the content. 3. Otherwise, I used it like so: input type: 'textarea', name: 'suggestions_reviewer_comments', value: @reviewform.suggestions_reviewer_comments And this didn't produce any errors, but on the other hand the field in the form had the same appearance as the 'text' field. Thank you again. regards, seba On 12. 05. 2014 15:45, Sebastjan Hribar wrote: My assumption was based on the behavior of my form in my app. I'll test the way magnus wrote it and I'll post back here later today so I won't make any false statements. In order to capture the data I always used the input tag and that didn't allow for multiple line textarea. regards, seba 2014-05-12 15:08 GMT+02:00 Bartosz Dziewoński matma@gmail.com (mailto:matma@gmail.com): On Mon, 12 May 2014 14:49:33 +0200, Sebastjan Hribar sebastjan.hri...@gmail.com (mailto:sebastjan.hri...@gmail.com) wrote: I can only use textarea rows:'5' @testform.testing for displaying pruposes. Why? textarea is the way to do multiline text inputs in HTML. -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org) http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org) http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org) http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org) http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: multi-line input field
Thank you very much for the explanation. I was puzzled why let's say input tag number requires this syntax: input type = 'number' and it breaks when written number @@reviewform.number, name: 'number. And the opposite is true for textarea. regards, seba On 12. 05. 2014 19:44, Bluebie wrote: textarea's are made using the textarea tag. There is no such thing as input type=textarea. Maybe this comes from rails or something? In markaby unless you've created some helpers to do otherwise, it outputs whatever you write in your code - a call to input() wont be transformed in to a textarea or a button or any other kind of form element. Markaby really is just a way of writing html, using ruby syntax instead of xml/sgml, and not much more. --- Bluebie On Tuesday, 13 May 2014 at 3:34 am, Sebastjan Hribar wrote: But textarea isn't unknown or unspecified type, right? On 12. 05. 2014 18:19, Bluebie wrote: All web browsers will treat any unknown or unspecified type of input as being a text input. This is why we can have things like input type=email and it doesn't destroy everything :) --- Bluebie On Tuesday, 13 May 2014 at 1:57 am, Sebastjan Hribar wrote: Here was my mistake: I thought that in order for setting the model attribute data like so: common_attributes = {title: input.title, ..., general_remark: input.general_remark} I have to explicitly state the input tag in the form like so: input textarea @reviewform.general_remark, rows: 5, name: 'general_remark' and this produced the error about tag not allowing the content. 3. Otherwise, I used it like so: input type: 'textarea', name: 'suggestions_reviewer_comments', value: @reviewform.suggestions_reviewer_comments And this didn't produce any errors, but on the other hand the field in the form had the same appearance as the 'text' field. Thank you again. regards, seba On 12. 05. 2014 15:45, Sebastjan Hribar wrote: My assumption was based on the behavior of my form in my app. I'll test the way magnus wrote it and I'll post back here later today so I won't make any false statements. In order to capture the data I always used the input tag and that didn't allow for multiple line textarea. regards, seba 2014-05-12 15:08 GMT+02:00 Bartosz Dziewon'ski matma@gmail.com mailto:matma@gmail.com: On Mon, 12 May 2014 14:49:33 +0200, Sebastjan Hribar sebastjan.hri...@gmail.com mailto:sebastjan.hri...@gmail.com wrote: I can only use textarea rows:'5' @testform.testing for displaying pruposes. Why? textarea is the way to do multiline text inputs in HTML. -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list