Displaying 20 results from an estimated 11000 matches similar to: "utf-8 encoding problem for text field"
2008 May 06
1
Problem with ActionWebService and UTF-8 encoding
Hello,
I have a Rails App which serve a Soap Web Service with ActionWebService.
I accept 2 string parameters that must contain xml.
The data sent are in UTF-8, but the non-ascii char (é, à ...) in the message
are crippled at the end.
I tested the app, database, html, ... all accept utf-8, a direct http post
works well, but going through the web service broke the content.
I tried to manually set
2006 Jul 27
2
setting initial text field values in a form
Hi,
I am trying to create a basic form in which I want one of the fields
initialized before displaying it.
My code (in a view) is as follows:
<%
if ( session[:user_id] != nil )
then
logged_in_user = User.find(session[:user_id])
end
%>
<% form_for :suggestion do |form| %>
<label for="suggestion_title">Topic:</label><br/>
<%=
2011 Nov 02
3
form_for text_field
I have a form
... html .....
<% form_for @person do |f| %>
... html .....
<%= f.text_field :last_name %>
... html .....
<% end %>
When last_name field of @person doesn''t contains french special symbols
like ''é'', all characters are displayed in the input control
(f.text_field :last_name ).
Else only symbols before french special symbol are
2012 Apr 09
0
Autocomplete text-field version of dynamic select menu?
I have a form for submission of brand, model, and style. Style
belongs_to model, and model belongs_to brand. The form is actually a
style submission form, but allows users to create new brands or models
as well, should they not exist.
What I want is for the autocomplete for ''model'' to populate when an
object for ''brand'' is selected in the first text field..
Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"
2010 Aug 01
3
Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"
Hi
First off, I''m using Ruby 1.9.1p378 and Rails 2.3.8.
I was creating a minimal application to test handling of Norwegian special
characters when I bumped into this strange problem...
I have a simple Car model with fields maker:string and model:string.
For the controller I planned to just have an index action do all the work:
class CarsController < ApplicationController
def index
2006 Jul 31
4
Login Password text field values
I have a text field that I use for logging in users. Due to the design
of my site, I don''t have room to put the word "username" in front of the
text field so I''d like to actually display it inside the field and then
have the word clear when the user clicks on it.
How could I modify something like this
<%= text_field "user", "login", :size
2006 Feb 20
0
How to reference a field of an associated object in a text_field
Hi,
I hope someone can help, I am stumped.
I have a Registration ActiveRecord object. It records registrations
for people for classes.
class Registration
has_and_belongs_to_many :people
has_and_belongs_to_many :scheduled_courses
end
I have a form that allows someone to register. A registration form
will register two people. They fill in their names, addresses, and
the classes they
2006 May 04
1
Instance or local vars for field helpers in partial template
I''m getting confused.
If I have a view (.rhtml), I can use a field helper like:
<%= text_field :mymodel, :attribute %>
This uses the value from @mymodel.attribute
Now, if I am rendering a template normally (i.e. not partial), I would
expect @mymodel to be a model object defined as an instance variable in
the controller.
However, if I am rendering a partial template, I
2006 May 12
4
default value in text field
hi,
This should be really simple, but i cant seem to find the answer
anywhere!!
In my _form.rhtml I have the following text field, how can I define a
default value?
<%= text_field ''purchaseorder'', ''number'' %>
--
Posted via http://www.ruby-forum.com/.
2006 Apr 24
0
Updating a form containing array of text fields with has_many/belongs_to relation?
I''ve got a User class and an Employer class set up as follows:
User.rb:
has_many :employers
Employer.rb
belongs_to :user
My tables are as follows:
mysql> select id,first_name,last_name from users limit 5;
+-----+------------+-----------+
| id | first_name | last_name |
+-----+------------+-----------+
| 711 | Patrick | Stewart |
| 714 | Larry | Davis |
mysql>
2006 Nov 04
0
Using Field Helpers to Edit a Related Model Object
Hello folks,
Here''s a question about creating an edit screen for a model and a
related model. On page 355 of the AWDWR book (printed page 464 of the
2nd edition pdf), there''s a little table showing how form parameters
map to the params object. One of them is:
user[address][city]=Wien
... maps to params as ...
{ :user => { :address => { :city =>
2018 Apr 26
0
Character encoding mystery
On Thu, Apr 26, 2018 at 07:29:41PM +0200, Emmanuel Florac via samba wrote:
> Hi everyone,
>
> I have a very annoying character encoding problem. Have a look to this:
>
> # ls -l M*mo-1.*
> -rw-rw-rw- 1 root root 8417218 6 sept. 2013 Mémo-1.aif
> -rwxr--r-- 1 hope hope 8417218 6 sept. 2013 Mémo-1.aif
> -rw-rw-rw- 1 root root 363175 6 sept. 2013 Mémo-1.m4a
>
2006 May 22
2
Inserting data in a table with a varchar key field
Hi all,
I have some problems inserting data into a legacy table. the key field
of this table is a field named CIN which is a varchar(15).
when I try insert into this table using a form (generated by the
scaffold generator) I get this Error :
_____________________________________________________________________
undefined method `CIN_before_type_cast'' for #<Candidat:0x370d8c8> |
2011 Aug 07
3
New field does now show in browser
Hi all
I just added a new field phone to form _form.html.erb created with:
rails generate migration AddPhoneTotickets phone:string
added with rake migraiton
and the new field does not show in the browser
new
<div class="field">
<%= f.label :phone %><br />
<%= f.text_field :phone %>
</div>
old
<p>
<%= f.label :phone
2006 Aug 05
0
Adding quotes around a text field
I have a text field where people enter tags and click a button to
submit. Some of the users are entering multiple tags accidentally (i.e.
''really'' and ''cool'' instead of ''really cool'') so I''d like to alter my
code so it automagically adds quotes on either side of whatever they
submit. I haven''t the foggiest idea where to
2006 Jun 25
0
text field auto complete
I have a form with hierarchical text fields that could be improved if it
filled automatically the fields above the field in which information is
inserted and makes suggestions to the fields below. is it possible make
the text_field call a method when the user presses enter or selects an
option from the pull-down menu generated by the auto complete?
Thanks,
Ricardo
--
Posted via
2015 Nov 26
0
Proposal for Ambisonics format in vorbis comment.
Greetings,
I apologize if I posted this in the wrong list, I wasn't sure where to post it, but seeing as the tags are called "vorbis comments" I thought vorbis, rather than ogg-dev, would be the right choice. (actually, I'm not even a developer anyway)
What I'd like to propose is a simple way to encode ambisonic files in vorbis comments as simple tags. By this I don't
2007 Dec 16
0
pass the model type to the action via a hidden field?
I have a question about the acts_as_commentable plugin. In the
instructions it says to use hidden fields to pass the model type and
model id. This is somewhat confusing me. I am trying to add comments
to a user object and am not sure how to specify the model type. This
is the link that I am using to get the comment view where one will
enter his/her comments:
<%= link_to "add a
2012 Jan 06
1
How to pass a field from simple_form as a hidden div value
Hi folks
Im trying to pass a value to my hidden div using simple_form but im
not sure how to do this, was wondering if anyone could help me with
this. Here is my view using simple_form
<%= f.label "First name" %>
<%= f.text_field :first_name %>
<%= f.label "Last name" %>
<%= f.text_field :last_name %>
<%= f.input :full_name, :as =>
2006 Jan 13
5
Form field naming semantics question
Hi,
I have a question today regarding how the various form elements in
_form.rhtml are named.
I understand that for a database table "persons" with a column headed by
"name", then in _form.rhtml it will probably be like:
<p><label for="person_name">Name><br/>
<%= text_field ''person'', ''name''