Android Question EditText field with must input

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Is there an option to make an EditText "must input"?

I am looking for this kind of workaround:
An EditText field on my form with "must input"
A Button on my form with event like Activity.FinishWithCheck
Unable to leave the form and underlined or red bordered fields with no input but must have.
To cancel the form a Button with event Activity.Finish or the default Back button.

Otherwise I have make a lot of checks myself on the event Activity.Finish.

Best regards,
André
 

AHilberink

Active Member
Licensed User
Longtime User
Check Focus change event....

If the edit lost focus then you can check the content. If it is empty.....

Hi Manfred,

Thanks for your reply. I have a form with about 60 edit fields. If the user does not park on one of the fields, the lost focus event will not be triggered for that field. So the empty check will not be done.

Best regards,
André
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
you can put all edits into a list or array and then you call a sub which will check all edits in the list/array

Hi Manfred,

That would be an option. This way I can build my own checkroutine. Needs to be carefull on new and removed fields :).

Thanks for this great answer.

Best regards,
André
 
Upvote 0
Top