Flask-admin create a button next to a text field
<p>I've made a simple form using Flask-admin that looks like the following. I'm now looking into creating a refresh button next to the API text field, but don't really now how to.</p>

<p>Is this called a widget or inline model? I haven't been able to find a button in WTForms either that I can use. Would appreciate any examples on this as I've been able to override textfields, but not place other elements next to it in a easy way.</p>

<p><a href="https://i.stack.imgur.com/J0ey2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J0ey2.png" alt="enter image description here"></a>
    class AdministratorView(sqla.ModelView):
    page_size = 10</p>

<pre><code>column_searchable_list = (
    'username',
    'description'
)

column_list = (
    'username',
    'apikey',
    'description',
    'active'
)

column_exclude_list = list = (
    'apikey',
    'auth_type'
)

form_excluded_columns = (
    'auth_type',
    'photos'
)

column_labels = {
    'apikey': 'API Key'
}

form_widget_args = {
        'apikey':{
            'readonly':True
        }
}

form_create_rules = (
    rules.FieldSet(('username', 'password', 'description'), 'Personal'),
    rules.FieldSet(('roles', 'apikey', 'active'), 'Permission'),
)

form_edit_rules = (
    rules.FieldSet(('username', 'description'), 'Personal'),
    rules.FieldSet(('roles', 'apikey', 'active'), 'Permission'),
    rules.Header('Reset password'),
    rules.Field('new_password')
)

def get_create_form(self):
    form = self.scaffold_form()
    form.username = fields.StringField('Username', [validators.Required()])
    form.password = fields.PasswordField('Password', [validators.Required()])
    return form

def get_edit_form(self):
    form = self.scaffold_form()
    delattr(form, 'password')
    form.new_password = fields.PasswordField('New Password')
    return form

def on_model_change(self, form, model, is_created):
    if is_created is False:
        if form.new_password.data:
            model.password = generate_password_hash(form.new_password.data)

def is_accessible(self):
    if login.current_user.is_authenticated:
        return login.current_user.has_role('admin')
</code></pre>

<p><strong>Edit:</strong> I'm able to add a new element such as a header/h1 adding a html file like this:</p>

<pre><code>{% extends 'admin/model/edit.html' %} 
{% block body %} 
    &lt;h1&gt;My custom header&lt;/h1&gt; 
    {{ super() }} 
{% endblock %}
</code></pre>

<p>However, I can't figure out how to make changes to particular fields in the rendered form. Looking at the edit.html all I can see is the following. How do I "get inside" the rendered_form and add my custom button?</p>

<pre><code>{% block edit_form %}
    {{ lib.render_form(form, return_url, extra(), form_opts) }}
  {% endblock %}
</code></pre>