editor.create(false).set() of a text field doesn't recognize text which evaluates to a number

editor.create(false).set() of a text field doesn't recognize text which evaluates to a number

pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

I have an embedded cloudtable on my web page. My javascript code takes page input and adds a row to the table. It uses an "editor.create(false).set().submit()" call such as that following to do the transaction.

let subResult = editor2.create(false).set('dp-39', print1Size2Element.value).submit(); // print1 size

In the above call "editor2" is my table. 'dp-39' is a cloudtable text field. "print1Size2Element" is a text input field on the page. This works fine when "print1Size2Element.value" has non-numerical characters in it. But if the text value of "print1Size2Element" would evaluate to an integer or a decimal number, the new row is added to the table but the 'dp-39' field is not filled. Is there a way to make this work?

Answers

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    In addition, a "print1Size2Element" text value of '99.2" X 99.3"' also will not fill in the new row.

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    Scratch that last comment, when "print1Size2Element" has a text value of '99.2" X 99.3"' the proper text is indeed populated into the new row. But the initial problem as stated above still exists. When "print1Size2Element" text value evaluates to a pure integer or decimal number, its field in the new row is not populated properly.

  • allanallan Posts: 61,022Questions: 1Answers: 9,951 Site admin
    print1Size2Element.value.toString()
    

    might work if it is just an integer issue on the client-side? Although assuming print1Size2Element is an input element, then it should always be a string anyway...

    Allan

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    I tried the toString() but it still doesn't work.

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    the textarea fields have the same problem.

  • allanallan Posts: 61,022Questions: 1Answers: 9,951 Site admin

    Could you link to me a page showing the issue so I can debug it please?

    Allan

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    The page is "https://philipmarksart.com/email". Hitting the button "Save Page To Email Table" puts the page data as a row into the cloudtable embedded on that page. The "Size" input boxes exhibit the problem. The table is sorted first by "Cust Email", and second by "Email Id#". This page keeps track of email data sent by the customer to me and email data sent by me to the customer.

  • allanallan Posts: 61,022Questions: 1Answers: 9,951 Site admin

    This shows the data I've just tried to enter, but I didn't get an error. Did I put something in incorrectly?

    Allan

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    The page is "https://philipmarksart.com/email". Hitting the button "Save Page To Email Table" puts the page data as a row into the cloudtable embedded on that page. The "Size" input boxes exhibit the problem. The table is sorted first by "Cust Email", and second by "Email Id#". This page keeps track of email data sent by the customer to me and email data sent by me to the customer.

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    On the "https://philipmarksart.com/email" page, the embedded email cloud table is displayed at the bottom of the page. In this table, if you look up your message by email "allan@example.com", and by email id number resulting on the page (in your case 347) when you open up the dropdown you will see in that row that the "Print1 size" field (under "Order Prints: Size" on the page) is blank (It is a text field) whereas you had entered 123. On the other hand "PrintOnePriceNoShipping = 1.00" and "Print1Qty= 2" and "Print1shipping = 3.00" as you entered them (they are all supposed to be numbers). The value of the print1 size field never made it into the table while the values of the other fields did. Same with the "Orig size" field ("Size" on the page) where 321 never made it. Same with the "Orig Available" field ("Available" on the page) where 2 never made it. Sorry if the names are a little confusing.

  • pmarks906dpmarks906d Posts: 61Questions: 18Answers: 0

    Hi, I think this may be a bug in cloudtables. When I type in a number into a input text field, and then create a new row in my embedded cloudtable including data from that input thext field, the new row in the table doesn't show the data in the corresponding column. If I instead type in non-numerical text, the data does show up in the new row in my embedded cloudtable on the page. Has any progress been made on this issue? Thanks

Sign In or Register to comment.