How not to hash part of user data in Cakephp - cakephp

In my cake app user needs to submit mobile number with the registration form, I see that mobile number is automatically encrypted to some other number, how do I not encrypt part of user data ? especially the 10 digit mobile number ?

Since the database field is of type int I'm guessing the issue arises when you try to save phone numbers that are not strictly integers, i.e. +123456, 123 456 789, 00123 456, 123-456-789 etc. You must use a varchar field to store phone numbers that include spaces, hyphens, pluses or start with a zero.

Related

Formatting telephone numbers basing on a country

I want to format the telephone numbers to: 1) Start with +country code, 2) Format the numbers (spacing after a given number of figures) depending on the recognized country format. Any help is highly appreciated
You can check out this tutorial on phone number/country code selection: https://www.codenameone.com/blog/tip-activation-ui-builder-pattern.html
If you want separate fields for each block in the number see this https://www.codenameone.com/blog/validation-regex-masking.html specifically the auto move functionality to "jump" to the next field.

Get letters instead of numbers in option button with Access

I was trying to design a form in access, when i was in the marital status field i think it was a good idea to use a group of option buttons but i can save letters only numbers. This is not bad but i would like to save letters because is easier to remember. I have 4 values. I have other similar fields, like sex, education and so.
You can use Choose. It returns values from input of 1 to n and Null for values outside the range. This can be used by Nz to return a value for unknown inputs.
This can be used a ControlSource for a textbox, here for values between 1 and 4:
=Nz(Choose([NameOfYourOptionBox], "Male", "Female", "Hermaphrodite", "None"), "Unknown")

Converting a percentage whole number in one field to a decimal in another field in Adobe Livecycle

I'm creating a budget template in Livecycle Designer.
I have a field where users can enter a percentage as a number (for example if you want to enter 75%, just enter 75).
I'd like another numfield box to take this number and convert it to .75
Can I do this across num fields or do I have to do it one box (where a user enters 75 and it turns into .75 automatically).
If you just want to enter integer numbers in the numeric field then that can easily be done by just taking a numeric field and then simply entering this javascript in the "exit event" of the field as:
var value1=this.rawValue;
this.rawValue="."+value1;

Get shipment Carrier in Amazon MWS?

How to get a Carrier Name in Orders API of Amazon MWS for MFN Account which is already shipped? is it possible to do this using Order API?
I don't think there currently is any API to retrieve tracking information (or even just the carrier name) through MWS.
For the sake of completeness: To submit shipping information including carrier names and tracking numbers, you can use the SubmitFeed API with FeedType=_POST_ORDER_FULFILLMENT_DATA_. The corresponding XSD (OrderFulfillment.xsd) defines the following values as valid CarrierCodes: USPS, UPS, FedEx, DHL, Fastway, GLS, GO!, Hermes Logistik Gruppe, Royal Mail, Parcelforce, City Link, TNT, Target, SagawaExpress, NipponExpress, YamatoTransport . All other carriers must use the CarrierName field.
While I'm sure it's available in MWS, it would be much easier to use the carriers shipping number structure to determine the carrier.
IE...
Fedex can have 12 or 15 digit tracking numbers and the barcode can be 22 digits.
UPS has 1Z in front of their tracking.
USPS format is 20 digits (e.g. 9999 9999 9999 9999 9999), or a combination of 13 alphabetic and numeric characters, usually starting with 2 alphabets, following by 9 digits, and ending by "US" (e.g. EA 999 999 999 US
build regular expression to handle these easily.

Validation against to database

I have several textboxes and users are entering same data in one of these fields. I have another table which is store machine_no. I would like to restrict user for possible wrong entries. Example if there is no machine_no #4 on table, user will be warn with message box.
Machine_no Value1 In first day
1 500
2 400
3 600
Machine_no Value1 second day
1 8678
2 45645
3 54645
Thanks in advance
If you really want to restrict the available choices, I'd replace the free form textbox with a dropdown list of choices populated from your table.
You could use a NumericUpDown control to let the user enter only integers and validate against a generic List of integers or an array of integers (you can load the list with the existing machine numbers on your data base table), and finally you can use ErrorProvider control to show a warning to the user if enters a not valid number.

Resources