Skip to Content
author's profile photo Former Member
Former Member

Input format for InputField

Hi everybody,

I have a question regarding input fields.

I´d like to ask for a serialnumer of a materialnumber.

This materialnumber has a serialnumbermask like EAN:XXXX-XXXX-XXXX-XXXX.

Is there any approach to assign the Input field an input mask, so that the user just may enter the Xes ?

or do I have to create a component that dynamically creates the input fields with dnamic length ?

Does anybody allready have experience with that topic how to solve that ?

Best regards, Matthias

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2010 at 01:45 PM

    Hi,

    Usually it can be done 2ways:

    1. half of the text is static right then take a textview and apply this static text and show it to the user before the input field.

    2. Create 2inputs fields, 1st part is read only/disbaled with a static text and 2nd part being dynamic as user enters/inputs it.

    You need to concatenate both and store as required.

    Regards,

    Lekha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2010 at 03:04 PM

    Thanks for your answer.

    I have only one problem with it: This solution is a little bit static.

    Im my case I have a table, that contains different masks für each material.

    lets say I have material 1: Its Mask is EAN:XXXX-XXXX-XXXX

    and Material 2 has Mask EAN:QXXX-12-XXXX

    and a third material has a different kind of mask.

    So there is not method to apply a input filter on a input field ?

    Only a static way or write a selfmade component that dynamically creates the input fields an the static parts and returns it as one variable ?

    best regards, Matthias

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Yes, as there could be different values for different material numbers. Then the right side value also should be bound dynamically. I just gave an example for static one. How to build this as dynamic. you need to have an action so that if a user enters a material number..the right side text needs to be updated as well..as it is not static.

      Regards,

      Lekha.

  • Posted on Oct 25, 2010 at 03:21 PM

    hi, Matthias..

    About the input mask, from my experience, the AJAX is very helpful, and is a common useful solution. However now, we can not use AJAX in this requirement directly.

    From your description, i think:

    Why do you use one "Static" display-text in the right side of the input field, which can tell user the input field's input mask?

    And in read process, you can have one method to check whether the user does input rightly by reference to your mask..

    Ya...Maybe this solution is not good, and seems a little in-flexible.

    You also mentioned: different material has different mask..

    Ya, you know, you can also use this approach, just add one context attribute which is bound to the "static-display" text view, which will has different content to different input-field.

    Very glad to discuss with you.

    Best wishes.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.