Comments (7)
Thank you for submitting a ticket. It looks like you haven't filled in the issue template properly and thus we might not be able to help you with this one. Please check out issue templates at https://github.com/laraform/laraform/tree/master/.github/ISSUE_TEMPLATE folder and add what's missing. This is an automated message.
from laraform.
I added a sample PWA app with both normal component and async component. Both fails on Vue CLI 4.
The sample included premium package in premium branch
https://github.com/yespbs/laraform-pwa
Please help me with your suggestions
from laraform.
any updates?
from laraform.
I've installed the https://github.com/yespbs/laraform-pwa repo but I only get a "Welcome to Your Vue.js App" screen. Please provide a working example for the repo with clear steps to initialize or provide the codes (not screenshots) to reproduce the bug according to the issue template.
from laraform.
from laraform.
Ok, now I can see that you are trying to create a wrapper around Laraform component. The right way to do it is this in MyFirstForm
:
<template>
<laraform :form="storedSchema" ref="form$"></laraform>
</template>
<script>
export default {
name: 'MyFirstForm',
data: () => ({
storedSchema: {
schema: {
hello_world: {
type: 'text',
label: 'Hello',
default: 'World',
},
},
buttons: [
{
label: 'Submit',
class: 'btn-primary',
disabled() {
// this.form$ is the root Laraform component
return this.form$.disabled
}
},
{
label: 'Reset',
class: 'btn-light',
prevent: true,
onClick() {
this.form$.reset()
}
}
]
}
}),
mounted() {
this.$refs.form$.on('submit', () => {
alert('Submission process started')
})
},
methods: {
submit() {
// implement custom solution
console.log('custom submit logic')
}
}
}
</script>
- You don't need to add Laraform as a mixin to the wrapper
- The
<laraform>
component should be referenced withref
and that's how you can access its.on
method.
from laraform.
That works! great
in my CLI 3 setup the PWA is working fine and I found the beforeMount and mounted is best hook to dynamically change the form schema. Only important knowledge is using the ref, I tried that but not exactly as guided here.
Thanks very much
from laraform.
Related Issues (20)
- If the submit button is clicked in a form, how can it automatically scroll to the first validation error if an error exists HOT 3
- [BUG] validation rule "before" and "before_or_equal" for date elements not working as expected HOT 2
- [QUESTION] is Possible to Drag n Drop component like google form? HOT 3
- [BUG] validation is not running on "onInput" event for TextElement (inputType="number") HOT 2
- [QUESTION] Planned support for Tailwind CSS? HOT 4
- [QUESTION] Does full version comes with uncompress version of JS code ? HOT 4
- [BUG] Trouble initiating laraform with laravel-pug (pugjs) HOT 4
- Support !!! [BUG] HOT 5
- [BUG] storing files in related model using AutoProcess and Wizard HOT 2
- [QUESTION] Custom schema for edit HOT 3
- [QUESTION] Hide Radio Group items HOT 2
- [BUG] PHP 8.1: HasMany::hasKey throws error HOT 6
- [BUG] PHP8.1/L9: HasMany::update fails if model has appended attributes HOT 4
- [BUG] AlgoliaSearchError HOT 4
- [BUG] Regexp mask for text inputs from backend HOT 4
- Maintenance Mode / Laraform Future / Vue.js 3 HOT 2
- Client-Side Storage HOT 2
- [BUG] Class "Route" not found (Laravel)
- [BUG] Form not showing after install HOT 4
- [QUESTION] Ignore data on submit HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laraform.