mec Posted April 23, 2011 Share Posted April 23, 2011 what does this mean? its in the custom fields. i dont understand what you put in this field 0 Quote Link to comment Share on other sites More sharing options...
computers.wheneva Posted April 23, 2011 Share Posted April 23, 2011 Hi Under your admin area under setup there is an option for Custom Client Fields, you can use this to add custom field to your client area, invoices and order form. For example say you would like to get your clients VAT/TAX Number you can create an field for it and have them fill it in on the order form. You can also use these fields on your PDF/HTML Invoices for example on the pdf invoice you will include it as $clientsdetails["customfieldsx"], remember that x is the number of your custom field. Thanks Computers Wheneva http://www.wheneva.co.za 0 Quote Link to comment Share on other sites More sharing options...
computers.wheneva Posted April 23, 2011 Share Posted April 23, 2011 Hi Mec, Sorry did not read your question properly. Unfortunately you will have to supply us with more information, for instance what are you trying to do, what version and so forth. Try to give as much detail as possible. Computers Wheneva http://www.wheneva.co.za 0 Quote Link to comment Share on other sites More sharing options...
sohouk Posted April 23, 2011 Share Posted April 23, 2011 The Regular Expression Validation String is a string of characters that is used to check (validate) the contents of the custom field. In other words, whenever an entry is made into the custom field, you can either just accept what is typed in as it is entered, or using a Regular Expression Validation String, check it to see if it’s in the right format. In truth, it’s not really that important and you could leave the validation field empty for most stuff if it’s just information that you don’t need to use later for calculating or formatting. If it’s not important then why bother? You would use validation strings to ensure that the data entered is in a format you want. If it does not matter then you can ignore it. Though having said that it’s probably a good idea to limit entries to only letters and numbers (see later) Simple example. Maybe you want users to enter a number (maybe a product or quantity a special code). You need to ensure all characters are just numbers, with no other stuff. So, you create your custom field without any validation and put a note to the client to only enter numbers. How difficult could that be? They enter: 12O. But then later, you want to use that figure and add 1 to it (to make it 121) and its not working. You wonder what could be wrong? What is wrong is that the O is in fact an O, not a zero. And that breaks any calculations. Its a lot easier to use a simple Regular Expression Validation String (usually shortened to RegEx) to check what is entered and warn the client if it’s wrong. In the above example we want them to only enter numerals. Here is what you would put in the Regular Expression Validation String box to only allow numerals: ^[0-9]*$ Here is another example which requires at least one numeral, but no more than three: [0-9]{1,3} Finally, as I mentioned earlier, you probably want to at least ensure the custom fields only contain alpha or numeric characters. Here a RegEx expression to do that. ^[A-Za-z0-9] This one allows you spaces as well. ^[a-zA-Z0-9 ]*$ Trevor 0 Quote Link to comment Share on other sites More sharing options...
mec Posted April 23, 2011 Author Share Posted April 23, 2011 i'm trying to add a drop down list of gameservers, listing each game available. http://i932.photobucket.com/albums/ad166/the_mec/Untitled-23.png but when i click on add to cart it tells me the game server is not valid. here's what i got for the custom fields. http://i932.photobucket.com/albums/ad166/the_mec/Untitled-24.png 0 Quote Link to comment Share on other sites More sharing options...
BigGainz Posted August 31, 2021 Share Posted August 31, 2021 On 4/23/2011 at 4:24 AM, sohouk said: The Regular Expression Validation String is a string of characters that is used to check (validate) the contents of the custom field. In other words, whenever an entry is made into the custom field, you can either just accept what is typed in as it is entered, or using a Regular Expression Validation String, check it to see if it’s in the right format. In truth, it’s not really that important and you could leave the validation field empty for most stuff if it’s just information that you don’t need to use later for calculating or formatting. If it’s not important then why bother? You would use validation strings to ensure that the data entered is in a format you want. If it does not matter then you can ignore it. Though having said that it’s probably a good idea to limit entries to only letters and numbers (see later) Simple example. Maybe you want users to enter a number (maybe a product or quantity a special code). You need to ensure all characters are just numbers, with no other stuff. So, you create your custom field without any validation and put a note to the client to only enter numbers. How difficult could that be? They enter: 12O. But then later, you want to use that figure and add 1 to it (to make it 121) and its not working. You wonder what could be wrong? What is wrong is that the O is in fact an O, not a zero. And that breaks any calculations. Its a lot easier to use a simple Regular Expression Validation String (usually shortened to RegEx) to check what is entered and warn the client if it’s wrong. In the above example we want them to only enter numerals. Here is what you would put in the Regular Expression Validation String box to only allow numerals: ^[0-9]*$ Here is another example which requires at least one numeral, but no more than three: [0-9]{1,3} Finally, as I mentioned earlier, you probably want to at least ensure the custom fields only contain alpha or numeric characters. Here a RegEx expression to do that. ^[A-Za-z0-9] This one allows you spaces as well. ^[a-zA-Z0-9 ]*$ Trevor This is extremely helpful! How would I go about making sure that the field meets these needs: At least 8 characters long No Spaces No special characters other than @ or . 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.