def prefill_form(self, form, pk):
        """
        Override this, will be called only if the current action is rendering
        an edit form (a GET request), and is used to perform additional action to
        prefill the form.

        This is useful when you have added custom fields that depend on the
        database contents. Fields that were added by name of a normal column
        or relationship should work out of the box.

        example::

            def prefill_form(self, form, pk):
                if form.email.data:
                    form.email_confirmation.data = form.email.data
        """

        Override this, will be called only if the current action is rendering
        an edit form (a GET request), and is used to perform additional action to
        prefill the form.

        This is useful when you have added custom fields that depend on the
        database contents. Fields that were added by name of a normal column
        or relationship should work out of the box.

        example::

            def prefill_form(self, form, pk):
                if form.email.data:
                    form.email_confirmation.data = form.email.data
        
flask_appbuilder/baseviews.py