nativescript-ui-feedback icon indicating copy to clipboard operation
nativescript-ui-feedback copied to clipboard

[FEATURE REQUEST] RadDataForm - New Field Properties

Open glen-stephens opened this issue 6 years ago • 9 comments

Would love to see properties added to disable auto capitalization and auto correct. TextFields support this, but it does not appear that this is supported in the RadDataForm's, unless I can't find it.

glen-stephens avatar Nov 08 '17 05:11 glen-stephens

+1

tusharvikky avatar Feb 28 '18 16:02 tusharvikky

+1

CAJazzer avatar Dec 12 '18 02:12 CAJazzer

+1

wheredidgogogo avatar Apr 30 '19 05:04 wheredidgogogo

+1

adfdev avatar Jun 05 '19 08:06 adfdev

+1

gaudsonu98 avatar Nov 27 '19 06:11 gaudsonu98

+1 Just spent 3 hours to get this working with RadDataForm and no joy. It's critical for a user name since it is case sensitive. The fact that it's not possible with the data form is truly shocking.

KirilOkun avatar Dec 18 '19 12:12 KirilOkun

+1 This is really needed.

rob4226 avatar Nov 12 '20 15:11 rob4226

I just wanted to post this in case it can help anyone. I'm using NativeScript 7 with Angular and TypeScript (but you can also just use regular JavaScript) and I got it working by accessing the native elements of iOS and Android used under RadDataForm. I was also able to figure out the types for TypeScript which was really nice to see all the different InputType's available*:

<RadDataForm [source]="item" (editorUpdate)="onEditorUpdate($event)">
    <TKEntityProperty tkDataFormProperty name="description"></TKEntityProperty>
</RadDataForm>
import { DataFormEventData } from 'nativescript-ui-dataform';
import { ios } from '@nativescript/core/application';

// ... inside an Angular component
  public onEditorUpdate(dataFormEvent: DataFormEventData): void {
    if (dataFormEvent.propertyName === 'description') {
      if (ios) {
        const iosTextField = dataFormEvent.editor as UITextField;
        iosTextField.autocapitalizationType = UITextAutocapitalizationType.Sentences;   // "Sentences", "Words", "AllCharacters", or "None"
        iosTextField.autocorrectionType = UITextAutocorrectionType.Yes;   // "Yes", "No", or "Default"
      } else {
        const textEditor = dataFormEvent.editor as com.telerik.widget.dataform.visualization.editors.DataFormTextEditor;
        const androidEditText = textEditor.getEditorView() as android.widget.EditText;
        androidEditText.setInputType(android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);   // Many difference choices see Android docs: https://developer.android.com/reference/android/text/InputType
      }
    }
  }

*Android InputType choices, see Android docs: https://developer.android.com/reference/android/text/InputType

rob4226 avatar Nov 12 '20 18:11 rob4226

how to make this work with plain js N7?

lospringliu avatar Mar 15 '21 04:03 lospringliu