Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Data in fields are not appeared in popup


Hello ,

Metronic Vue demo 8
when I want add customer the popup opening and data in some fields are existing , when I click discard the data clear from fields , the issue here when I click The sign of the exit popup and click add customer again , The data that appeared in the popup when adding a customer does not appear again .

this is the link :
https://preview.keenthemes.com/metronic8/vue/demo8/?_ga=2.71315155.1104186020.1694596631-1780376720.1674214128#/apps/customers/getting-started

Metronic
Vue demo 8 version 8.1.6
node v18.14.1
npm 9.6.0


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

If you don't refresh the page, the data you've filled will remain in your input fields. To ensure the form always starts with the same values when a user opens the modal, you can reset the form data within the Bootstrap show.bs.modal event.

Here is an example:

const initData = {
name: "Sean Bean",
email: "sean@dellito.com",
description: "",
addressLine: "101, Collins Street",
addressLine2: "",
town: "Melbourne",
state: "Victoria",
postCode: "3000",
country: "US",
};
const formData = ref(initData);


onMounted(() => {
addCustomerModalRef.value?.addEventListener("show.bs.modal", function () {
formData.value = { ...initData };
});
});


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(