Gossamer Forum
Home : Products : DBMan : Installation :

Help! Accented characters in Radio button

Quote Reply
Help! Accented characters in Radio button
Hi.

Anybody used accented characters in their field definition so that we can get accented characters when filling out the forms? Or found a way around this? I get a error every time.

Is it possible to edit db.cgi tu put in the radio button names directly according to my fields even though they don't havethe same name as the fields. Because I can use non accented names in the field but use a variable to change the name in the radio buttons in the form? or edit db.cgi to change the names or tu actualy create the radio buttons in the db.cgi. HEELP!
Quote Reply
Re: Help! Accented characters in Radio button In reply to
Thanks a lot sun.

Yes, that's exactly waht I want to do, but, in the radio buttons whaich are generated automatically by db.cgi.

I don't know much perl but I more or less understand some of the sub routines in the code in db.cgi.

There must be a way to create my own radio buttons and forget tha "autocreation".

Thanks anyway for your concern. I really apreciate it.

Regards

BrianL
Quote Reply
Re: Help! Accented characters in Radio button In reply to
You can create your own radio buttons and forget about autocreation. The only problem will be that previous values entered will not be selected when you modify a record.


------------------
JPD





Quote Reply
Re: Help! Accented characters in Radio button In reply to
Hello BrianL:

I will answer your question based on my best understaning of the problem. Please accept my most sincere apologies if I misunderstand your question.

I think maybe you want to write a subroutine that translates the fields before it is printed in html. This will allow you to put in a field name that is different from what is going to be shown in the html. Something like this would probably work:

s/hello/h&111;llo/;

or something to that effect. Note that &111; is made up by me. I do not know what it is, just giving an example.

Of course, in order to do what you want, you have to be somewhat conversant with Perl.

Hope that helps
Sun

------------------
-------------------- Gossamer Threads Inc. ----------------------
Sun Djaja Email: sun@gossamer-threads.com
Internet Consultant
http://www.gossamer-threads.com

Quote Reply
Re: Help! Accented characters in Radio button In reply to
Can you explain to me a little bit more?

what do you mean by: "...The only problem will be that previous values entered will not be selected when you modify a record."

You got me there. I'm a bit dumb today JP.

BrianL
Quote Reply
Re: Help! Accented characters in Radio button In reply to
That's okay. Smile

When you use the &build_radio_field structure, the script creates the radio field based on your definitions in the .cfg file. It also looks at the current value of the field, if the current value is the same as one of your options, it adds "CHECKED" to the radio field code. It's not a factor when a record is added, unless you have a default value for that field, but it is a factor when a record is modified.

If you create your own radio field, there isn't a way to check for the current value of the field as you build it, so no option will be "CHECKED."

You might be able to use the codes for the other characters right in the radio field definitons, though. Have you tried to use them that way?

I don't know what the codes or keystrokes are for any of the accented letters, so I don't know how to give you an example.


------------------
JPD





Quote Reply
Re: Help! Accented characters in Radio button In reply to
Yes JP

I tried to use "Región" which is "Región" but got an error.

Probably you know a way to get around this?

Regards

BrianL
Quote Reply
Re: Help! Accented characters in Radio button In reply to
I have used extended characters in a select field with no problem.

The following worked for a Norwegian travel site I did:

Code:
County => 'Møre og,Nord-Trøndelag,Sør-Trøndelag,Østfold'

I put the letters in using the "keymap" program on Windows, since I didn't know where they were on my keyboard.

What happens when you use the extended characters? What sort of error do you get?

------------------
JPD







[This message has been edited by JPDeni (edited August 19, 1999).]