Text Field Behavior

Viewing 4 reply threads
  • Author
    Posts
  • August 7, 2019 at 3:09 PM #36236

    Dave Emme
    Participant

    I have a Text field with a Multi-select Pick List attached. The document is synced between my iPad and my iPod Touch.

    On the iTouch I can both fill the field from the Pick List and tap on it to get an insertion point and type arbitrary text, regardless of whether the field is empty or has Pick List text already in it.

    On the iPad, under no circumstances can I get an insertion point to type arbitrary text.

    Both devices running iOS 12.3.1; TapForms 5.3.5 (921). I’m hoping that the iPad behavior is a bug.

    For extra credit: what’s the deal with Text fields only holding a “small amount” of text? I’ve inserted most of the items in my Pick List, along with some manual padding, totaling 498 characters without complaint.

    For extra extra credit: why can’t I attach a Pick List directly to a Note field??

    August 7, 2019 at 11:23 PM #36240

    Brendan
    Keymaster

    For a multi-select Pick List, on the iPad because the way the multiple values get displayed vertically, I disable the text field there. The reason is because multiple values are just comma delimited and I’d have to switch to the regular text field, make you type in the values with commas, then when you exit the field, switch back to the display that is there now. It just seemed to me like it would be a bit jarring to see the field size jump like that. On the iPhone it’s a separate screen anyway, so you can edit the values directly there without having to go through the Pick List and then when you tap Save, it goes back to the details view and shows the values the same way as the iPad. I suppose I could maybe have some sort of dynamically expanding text field and you’d just type a Return character to get a new line, then when you tap out of the field I’d have to translate those newlines into commas. Kind of like how I already translate the commas to newlines. I’ll think about it.

    So the iPad’s behaviour is not a bug. It’s the way I built it.

    Note fields are designed for holding lots of text. Use a Note field if you need lots of text.

    I didn’t put Pick Lists on Note field because that didn’t seem necessary. Note fields can be used to display rich text too, whereas Text fields are for displaying plain text content. Although the Note field now can display plain text content too.

    August 8, 2019 at 3:17 PM #36255

    Dave Emme
    Participant

    Ok, here’s what I’m trying to accomplish: a field which will hold more than, say, 256 characters, which can have text entered via something like a Pick List (for consistency), and which will also allow me to supplement any Pick List entries by typing arbitrary text, either at initial creation or later. Plain text is acceptable – indeed, desirable. E.g. a Note field with an attached Pick List.

    But I currently can’t have that, so I got to probing the limits of a Text field, which prompted my original post, and what I considered anomalous behavior from the Text field. E.g. why does it behave differently on different devices? It does not follow the Programer’s Law of Least Astonishment. :-)

    Perhaps a Pick List attribute could be implemented on Note fields, but only enabled if the field’s Plain Text Note attribute is enabled?

    My current workaround is to have (1) a Note field to contain the complete desired text value for the record, including any manually-entered text, (2) a Text field with attached Pick List to allow choice of predefined value(s), and (3) a script to automagically copy the contents of the Text field into the Note field whenever the former changes. It works, but certainly is far from elegant (why does he have these two “text” fields with nearly the same contents?), and would not even be possible for a user without scripting abilities.

    All I really need is (1′) a Note field with a Pick List.

    August 8, 2019 at 6:27 PM #36258

    Brendan
    Keymaster

    I’m not sure about adding a Pick List to a Note field. Seems odd to me. And then how does it work with all the “Display As” options for Popup button, Checkbox button, Radio buttons, etc.?

    I suppose one option to keep things the same on iPhone and iPad with respect to the way multi-valued Pick Lists is concerned is I could slide you over to the text value entry screen on iPad the same way it works on iPhone.

    That would certainly make them operate the same.

    August 9, 2019 at 3:20 PM #36268

    Dave Emme
    Participant

    Pick List on a Note field “seems odd”? Please explain. I gave my real-world example in my previous post (which worked just fine in the legacy iOS app I migrated to TapForms from). Please tell me (really) what you think is “odd” about it. Or is there a different approach I should be taking to accomplish my stated “requirement”?

    As for “Display As” etc., I’m afraid you’re talking over my beginner level of experience with your app here. But they sound like things that the Plain Text Note option might allow a resolution for(?)

    Note that when my script copies the several chosen Pick List values from the Text field to the Note field, they come over as comma-separated strings. And I’m perfectly ok with that.

    On the other hand, it is your app. Maybe I should just be satisfied with my working kludge.

Viewing 4 reply threads

You must be logged in to reply to this topic.