<table><tr><td style="">aheinecke added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13172">View Revision</a></tr></table><br /><div><div><p>Apologies for the delay. Some travel, some sick days and some other work and the weeks fly by ;-)<br />
I'm getting back to this now.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D13172#inline-68594">View Inline</a><span style="color: #4b4d51; font-weight: bold;">aacid</span> wrote in <span style="color: #4b4d51; font-weight: bold;">builtin.js:99</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Not having a document to test makes this a bit harder, but let's say i write a number in a form, the form then changes that number to have dots as separator format and then i just go and add a number at the beginning/end of the "text" of that form. When it comes back here stringToNumber will expect commas and not dots and then everything will break?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'm not sure I understand the question. I understand it that you are concerned that the actual value of the field is changed by formatting and the user is then confused if he mixes the format when entering additional values.</p>
<p style="padding: 0; margin: 8px;">The trick for that is that the number is not actually changed. As soon as you focus in on the text field the text will change to the actual value. This is also what Acrobat does.</p>
<p style="padding: 0; margin: 8px;">So if you enter with dots but the form want's commas the number is transformed according to your locale for formatting. But as soon as you edit it to add more text it will be changed right back to what you originally entered.</p>
<p style="padding: 0; margin: 8px;">Here is an example that has most "predefined" format settings:</p>
<p style="padding: 0; margin: 8px;"><a href="https://phabricator.kde.org/F5918086" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5918086: FieldFormat.pdf</a></p>
<p style="padding: 0; margin: 8px;">Only the first three lines work in okular as they use the number format.</p>
<p style="padding: 0; margin: 8px;">Another example would be:<br />
<a href="https://www.pbeakk.de/fileadmin/redakteure/contents/PDF/Formulare/form_01.pdf" class="remarkup-link" target="_blank" rel="noreferrer">https://www.pbeakk.de/fileadmin/redakteure/contents/PDF/Formulare/form_01.pdf</a></p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13172">https://phabricator.kde.org/D13172</a></div></div><br /><div><strong>To: </strong>aheinecke, aacid<br /><strong>Cc: </strong>okular-devel, ngraham, aacid<br /></div>