Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

[Question] #306

Open
Open
@Alexandra2888

Description

@Alexandra2888

Can inputs be prepopulated with data from api? I tried like this but it's not working:


<script setup> import { reactive, computed, onMounted } from "vue"; import { TextField, EmailField } from "@asigloo/vue-dynamic-forms"; const user = reactive({ name:'', email: "", fax: "", uuid: "", }); const form = computed(() => ({ id: "user", fields: { name: TextField({ label: " Name", value: user.name }), email: EmailField({ label: "Email", value: user.email }), userFax: TextField({ label: " Fax", value: user.fax }), }, })); onMounted(async () => { try { user.value = await AxiosService.get( "/user/get", { name: user.name.value, email: user.email.value, fax: user.fax.value, uuid: user.uuid.value, }, { headers: { //headers }, } ).then(function (response) { console.log(response); }); } catch (e) { console.error(e); } }); </script>

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions