Skip to content

:messages attributes don't change the message. #5

@SergiArias

Description

@SergiArias

Probably not this package fault, but the :messages attributes don't work for me.

I checked and it converts it correctly to the data-message-success and so on in the markup. But when testing, it always take the value in the database. So maybe this mechanism is not working in the html forms plugin side.

just as an example, this is what I have (I am using alpinejs)

<x-html-forms :form="$form" :messages="['success' => 'Thank you!', 'error' => 'Yikes! Try again.']"
  class="relative side-form"
  x-data="formComp()"
  @hf-submit="load(0.4, 1, 'in')"
  @hf-submitted=""
  @hf-success="load(0, 0.7, 'out'); success = true"
  @hf-error="load(1, 1, 'out')"
  x-bind:class="{'success': success}"
>
 ...
</x-html-forms>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions