Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Vikrantcod1's avatar

mary ui

not able to integrate choice and dropdown also multiple images upload i'm new tom laravel please help

0 likes
8 replies
Vikrantcod1's avatar

I wanted to use choices for my form but when I select any choices it doesn't get selected I wish I could send you code snippets and issue as picture

1 like
Tray2's avatar

@Vikrantcod1 Copy you code and paste it within three back ticks ```

That makes the code look like this

public function myFunction()
{
	return 3+2;
}

Don't forget to close the code with another three back ticks after you are done.

2 likes
Vikrantcod1's avatar
<div class="px-4 mx-auto max-w-screen-2xl lg:px-12">
    <div class="py-8 px-4 mx-auto max-w-2xl lg:py-16">
        <h2 class="mb-4 text-xl font-bold text-gray-900">Add Temple</h2>

        <x-form wire:submit="saveTemple">
    @csrf
    <x-input label="Add temple*" wire:model="name" placeholder="add temple"  />
            <x-file wire:model="featuredImage" label="Temple Image" accept="image/png, image/jpeg, image/jpg"/>
            <x-image-library
                wire:model="files"
                wire:library="gallery"
                :preview="$gallery"
                label="Temple images"
            />
            <x-markdown wire:model="description" label="Description"/>

        </x-form>
    </div>
</div>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ $title ?? 'Page Title' }}</title>
    {{-- EasyMDE --}}
    <link rel="stylesheet" href="https://unpkg.com/easymde/dist/easymde.min.css">
    <script src="https://unpkg.com/easymde/dist/easymde.min.js"></script>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
          integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
          crossorigin="anonymous" referrerpolicy="no-referrer"/>
    {{-- Cropper.js --}}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.1/cropper.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.1/cropper.min.css"/>

    {{-- Sortable.js --}}
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/Sortable.min.js"></script>
    @vite('resources/css/app.css')
    @vite('resources/js/app.js')

    @include('layouts.partials.header')
    @yield('style')
    <script src="https://cdn.ckeditor.com/ckeditor5/36.0.1/classic/ckeditor.js"></script>

    @livewireStyles
</head>

error is Unable to locate a class or view for component [markdown].

Vikrantcod1's avatar
    <meta name="csrf-token" content="{{ csrf_token() }}">

i had aslo added it in the head section

shakib04's avatar

how to override the default app.layout in may ui. i want to use my own layout file for default

shakib04's avatar

how to work with Custom error field in mary ui form.

where i place this code? before the validate function calling? i placed but not worked. $this->addError('total_salary', 'This is a custom error message for total salary field.');

Please or to participate in this conversation.