This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Number Field Converting Number Entered


  1. atypicalv
    Member

    Greetings. Having a strange issue with a form that was working fine, but is now changing the number input into a number field.

    On the form, the field is set as a number field to collect cc numbers, limited to 15-16 digits. When a 16 digit number is entered (such as Visa/MC), the number is converted when you click continue and go to the preview screen before submitting the form. The format it changes to is like such: 4.80213990221813e+15

    With Amex numbers (15 digit) it does not change them, and the form was working fine until recently. Have not made any changes to the form or code.

    MachForm 4.3. Any help is appreciated, thanks.

    Posted 8 years ago #
  2. atypicalv
    Member

    Found this answer in another area, this solution works for anyone else with this issue:

    Yes, by default large numbers are being displayed using scientific notation. If you need to display the number completely, there is some small adjustment that can be done.

    Using phpMyAdmin or any other database management tool, go to your MachForm database and run this SQL query:

    ALTER TABLE ap_form_15032 CHANGE element_20 element_20 DOUBLE(16,0) NULL DEFAULT NULL COMMENT 'Number';

    The above assume your form id number is 15032 and your number field id is "element_20". You need to adjust it with your own form id and number field id.

    Posted 8 years ago #

RSS feed for this topic

Reply