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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle