### Author Topic: Custom Fields Capital Letters Only  (Read 1709 times)

#### treodude

• Jr. Member
• Posts: 57
##### Custom Fields Capital Letters Only
« on: July 11, 2013, 12:43:24 pm »
Dear Virtuemart Forum,

For our webshop it is necessary that the text customers put in, is in capitals.
Is there any way that I can disable small letters, or make all letters automatically capital?

Using J2.5.9 and VM2.0.20b

Kind regards,

Treodude

#### Maxim Pishnyak

• Global Moderator
• Sr. Member
• Posts: 2657
##### Re: Custom Fields Capital Letters Only
« Reply #1 on: July 11, 2013, 21:31:58 pm »

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #2 on: July 15, 2013, 13:16:33 pm »
Thanks!

Only one problem. I am not that big of a php expert, and neither do I know where to find all files.
I have a shopping cart as well, the one from VM AIO, which displays the letters, and all other default VM places where you can see your chosen products.

Where can I find the files in which I have to edit this in?

Kind regards,

Treodude

#### Maxim Pishnyak

• Global Moderator
• Sr. Member
• Posts: 2657
##### Re: Custom Fields Capital Letters Only
« Reply #3 on: July 15, 2013, 22:17:39 pm »
Could you post here link where do you want upper case?

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #4 on: July 17, 2013, 14:55:42 pm »
http://www.edsclassic.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=42&virtuemart_category_id=10&Itemid=163

If you go to this link, you will find (one of the several) where the Custom Field is; VUL HIER JE KENTEKEN IN (Dutch for; insert here your car license number)

Basically, actually has to be capitals. I think it is the best to convert the Customer Input the moment the Input is made. So, capitalize the value automaticaly, so it shows up everywhere in capitals.
This might be better because besides the locations noted above, there are several other locations where the license number shows up, and all of them have to be capitalized.

#### Maxim Pishnyak

• Global Moderator
• Sr. Member
• Posts: 2657
##### Re: Custom Fields Capital Letters Only
« Reply #5 on: July 17, 2013, 16:03:26 pm »
You know what plugin with its files need to be explored in your case.

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #6 on: August 08, 2013, 14:50:20 pm »
Well, I will try, since there are too many plugins too explain, but I think I can handle it.

Thanks for your help!

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #7 on: August 09, 2013, 13:27:39 pm »
Well, eehm, I have one more question.

It is sufficient enough to capitalize the input inmediatly.
I searched in the plugins/vmcustom/textinput/index.php for the variable the input was, but I can't find it.

Where do I have to insert that capitalize line in order to capitalize all?

Kind regards,

Treodude

#### Maxim Pishnyak

• Global Moderator
• Sr. Member
• Posts: 2657
##### Re: Custom Fields Capital Letters Only
« Reply #8 on: August 09, 2013, 13:56:44 pm »
Did you try to work with this part:
Code: [Select]
`<input class="<?php echo \$class ?>" type="text" value="" size="<?php echo \$this->params->custom_size ?>" name="customPlugin[<?php echo \$viewData[0]->virtuemart_customfield_id ?>][<?php echo \$this->_name?>][comment]"><br />`?

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #9 on: August 09, 2013, 16:27:07 pm »
*textinput.php, not index.php

And in textinput.php, I cannot find the line you mentioned.
Maybe the wrong file?

Also, I jsut upgraded to J2.5.14 and VM2.0.22a

#### Maxim Pishnyak

• Global Moderator
• Sr. Member
• Posts: 2657
##### Re: Custom Fields Capital Letters Only
« Reply #10 on: August 09, 2013, 22:31:25 pm »
default.php in com_virtuemart.2.0.22_ext_aio\admin\plugins\vmcustom\textinput\textinput\tmpl\
is also part of textinput plugin

#### treodude

• Jr. Member
• Posts: 57
##### Re: Custom Fields Capital Letters Only
« Reply #11 on: August 13, 2013, 16:09:29 pm »
Thanks, I found the file, but how should I modify it?

The link you sent first was about mentioning a valuable to become uppercase, "string" strtoupper ("string" \$string).
But I don't see any valuable, and I have also taken a look at the examples, but I still don't know.

Can you please help once more?

Kind regards,

Treodude