jonathan_m — 2014-07-04T12:46:00-04:00 — #1
The problem is that some users overwrite the field with other number or even with a message and the payment cannot be completed.
I would appreciate some help to prevent solve it.
Thanks very much.
jm_roson_bravo — 2014-07-04T12:52:58-04:00 — #2
Just apply the “readonly” attribute to the input element to prevent your users from modify its value.
They will see the content of the field – the number of the operation they are about to complete – but will not be able to interfere with it.
<input readonly="readonly" type="text" value="948594285942859245545245454" />
Obviously the number in the value must be implemented in other way since it is JS-generated,
jonathan_m — 2014-07-04T13:13:10-04:00 — #3
Thanks José. I had thought of hiding the element with css.
jm_roson_bravo — 2014-07-04T13:25:26-04:00 — #4
Hiding the input element with css does not solve the problem, since the code is still on the page and visible by disabling css styles.
Anyway, if you want to hide the element, you can do it using a hidden input, which does not appear on the page.
<input [I]type="hidden"[/I] value="948594285942859245545245454"/>
jonathan_m — 2014-07-04T13:35:21-04:00 — #5
Yes, but how many users would disable the styles or see the code?
jm_roson_bravo — 2014-07-04T13:42:05-04:00 — #6
It is not a problem of how many users or what the would do. Styling the page to hide the element is not the proper way to deal with the issue. You'd better use the readonly attribute to prevent the users to modify the value, adding also a label with a proper title for the element, such as "Operation Number", as it is implemented in many online shops all over the Internet.
This way the value is displayed for the buyer to see it as part of the purchase information.
jonathan_m — 2014-07-04T16:24:44-04:00 — #7
Thanks for the reply José. I have been reading about the subject, and seen that you were right.
Thanks for your help.
jm_roson_bravo — 2014-07-04T16:48:27-04:00 — #8
Probably there will be other ways to solve the problem, but I consider this one to be the simples and more efficient.