This is a migrated thread and some comments may be shown as answers.

DataForm: more comfortable way to define custom editor

1 Answer 64 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc
Top achievements
Rank 1
Marc asked on 09 May 2017, 04:02 PM

Hi,

I just want to know if there is a simpler way to define some 'custom views' within a DataForm than defining custom editors with platform specific code.

For example if I'd like to put two links/buttons within the registration form to access the terms of use or the privacy policy of our platform and under that I would like to add a Switch editor to accept/confirm our terms of use (which can be validated), then it would be more comfortable to be able to add just a StackLayout/GridLayout with the two buttons into the xml and apply any existing css classes, like I would do it in any other XML file (without a DataForm component) than defining some custom editors.

But as far as I read the docs, defining custom editors for those buttons/links from JavaScript is the only option right now. Will there be any alternative in a future release to place any custom view/container into a form, whose elements do not need to carry any value or validation, like in the use case of my example?

 

Best regards,

marc

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Tsonev
Telerik team
answered on 10 May 2017, 06:58 AM
Hi Marc,

Defining CustomPropertyEditor at this time could be done only from code behind by defining platform specific code for both iOS and Android as it has been described in the documentation. Also, this scenario has been demonstrated in the sample app here, which could be used for some further help.

However defining such an editor via XML could be a useful feature, that's why I logged new issue here, where the other customers could also vote on it. If there is an interest, this feature could be included for some of the next UI for NativeScript versions.

Hope this information helps

Regards,
nikolay.tsonev
Telerik by Progress
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Marc
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Share this question
or