Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ajax Bundle Laravel Package

appventus/ajax-bundle

View on GitHub
Deep Wiki
Context7
1.3.2
1.3.0
1.2.12
1.2.11
1.2.10
1.2.4

Auto-refresh a form

You can automatically send an ajax request to update your form when an input/select change, just add the data attribute "data-refreshonchange":

    <select name="category" data-refreshonchange="true">
        <option value="transport">Transport</option>
        <option value="structure">Stucture</option>
    </select>

Then in your controller's action:

 if ($request->query->get('novalidate', false) === false) {
    if ($form->isValid()) {
        // form is valid
    } else {
        // avoid to display errors when novalidate
        $form = $formFactory->createForm();
        $form->setData($user);
    }
}

For some reason, you would not refresh some parts of your form (for example an input type="file"). Then, add the data attribute 'data-ignoreonchange="$some_unique_id"'.

v1.2.3
v1.2.2
v1.2.1
v1.2.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor