DataForm: more comfortable way to define custom editor

2 posts, 1 answers
  1. Marc
    Marc avatar
    84 posts
    Member since:
    Oct 2013

    Posted 09 May Link to this post

    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

     

  2. Answer
    nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    284 posts

    Posted 10 May Link to this post

    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.
Back to Top