Save all data in UPPERCASE

Hi to everybody,
i need some help to approach with Corvid use.
First step - I have to save the data from my Member Registration form (personalized) in UPPERCASE,
also if people is writing them in lowercase. I need to apply the uppercase to all personal data field.
(not to email and password)

I’m newbie in Corvid, as i said, so i kindly also need to uderstand WHERE, exactly, write the code. Generally. Raw 2? After raw 6? It is the same?

In the second step, i need also to regulate the field for ex.:

  • max 2 letters
  • alphanumerical field in that format (AAAAAA11A11A111A)
    A=letter(text) 1=number
    lenth 16 (if not 16 caracters the field have to give error to the user)

Thank you in advance for your helping!

(Where to put code?)

Take a look into your console…

$w.onReady(function () {testFunction() });

function testFunction() {
 let myString = "Hello World!"
    console.log(myString.toUpperCase())
}

Hi Russian Dima! Thank you. Instead “HelloWorld” i’ve to put the name of the field? For example “#input4” ? or without “”?

I just gave you an example, not the solution :grin:.

Here you are talking about RegEx ???

In the second step, i need also to regulate the field for ex.:

  • max 2 letters
  • alphanumerical field in that format (AAAAAA11A11A111A)

A=letter(text) 1=number

lenth 16 (if not 16 caracters the field have to give error to the user)
By the way, do not use PICs when you show some code!
Use CODE-TAGS, like this…

$w. onReady(function() { }

Me for example, i am a very lazy person, i would NOT write all your code by myself. Either the code is already given, which i can copy or the issue do not interesst me.:grin:

You understand what i want to say?

If you want a good and fast help, then the helper needs a good and easy to understanding description of the problem, and also a ready code to work with.
And also enough INPUT, to give you at the end enought OUTPUT ! :wink:

And YES, you can delete all that SHITTY-CODE and just let this line untouched…

$w. onReady(function() { }

This is the STARTING-POINT of your CODE.
When page has loaded, this will start automatically.

Now you add your own function, which will start emidiatelly after the page has loaded completely…

$w.onReady(function() { start_FirstFunction() }

function start_FirstFunction() {  ...here your action-code ....}

A step further?..

$w.onReady(function() { start_FirstFunction() }

function start_FirstFunction() {
    console.log("Function started!")
}

Your first little working CODE!

Now test it either in PREVIEW-MODE or in LIVE does not matter.
When testing in PREVIEW-MODE, than take a look at the very bottom of the editor-site. You will find there a CONCOLE, which will show you the output (results) of the function.

OR…
When using the LIVE-MODE, for example in CHROME-WEBBROWSER, then press F-12 and go to CONSOLE. You will find there almost the same like in PREVIEW-MODE.

Delete your CODE completely and put this one in and test it.

$w.onReady(function() { start_FirstFunction() }

function start_FirstFunction() {
    console.log("Function started!")
}

When you understood it then you can make the next step…

$w.onReady(function() { start_FirstFunction() }

function start_FirstFunction() {console.log("Function started!")
    let myString1 = ($w('#YourInputField_ID_here').value).toUpperCase()
    console.log(myString)
 }

Replace —> YourInputField_ID_here with your own INPUT_FIELD-ID !
This example is just for one INPUT-FIELD.
You will have later to EXPAND the CODE.

Your CODE is growing.:grin:

Now do some brainstorming, how to continue?
Use the forum-searchbar, you will find enough example-stuff.
You can also visit my site, to learn a little bit :wink:

https://russian-dima.wixsite.com/meinewebsite

Thank you Russian Dima!
Mine was not the code (A=letter), just to explain what is my need.

You’re very patience person, i’ve studied as a programmer many years ago, and not sure, Js… I remember all the rules: true, false, if, then, else… but i used Cobol and C++ … very antiquate and totally forgotted. Just some function with excel.
I need to learn some bases for the sitax of Js, and how to apply for my little need.

I don’t know, neither, where/how to test a code. :rofl:
i’ve searched tester code online and for this code down here, anything happend.
Sure i was not able…

$ w . onReady ( function ( ) { start_FirstFunction ( ) }   

funzione start_FirstFunction ( ) {     console . log ( "Funzione avviata!" ) }  

In wix Forms, where i find the IDfield. (in Wix data is more simple)

i’ve to put many of YourInputField_ID_here
how i can divide them? ; ?

I’ll look for sure you site!