https://twill.io logo
Join DiscordCommunities
Powered by
# ❓questions
  • s

    savchuk.ivan

    12/23/2022, 1:21 AM
    Good afternoon! Previously, a question was asked about field validation in this order: blocks->repeaters->field. I found a way to validate such fields, but there is a problem with displaying error messages. How is the output of errors organized under the field (which has a red color)? class TestRequest extends Request { public function rulesForCreate() { return []; } public function rulesForUpdate() { return $this->rulesForTranslatedFields([ 'blocks..blocks.repeater_main_banner..content.color' => ['required'], 'blocks..blocks.repeater_main_banner..medias.image'=> ['required'] ], [ ]); } }
  • d

    DKC

    12/23/2022, 1:36 AM
    That is what I thinking of too. The best advantage is that data is not duplicating. Separating Block Modules is one of the way to achieve this. I have another idea but currently not work technically currently. I tried to inactive the "special language", create another page for this, but the alias currently can not be repeated.
  • v

    VadimG

    12/23/2022, 4:36 PM
    Hi! I would like to pass "state" parameter to google oauth, but I really have no idea, what I have to do for it using twill. Can you help me please?
    i
    • 2
    • 2
  • a

    antonioribeiro

    12/23/2022, 5:58 PM
    Anyone knows if it's possible to add tags select form field on a repeater? Looking at the code it seems we can't even change the name of the field, so we always get a
    tags
    item at the root of the payload.
  • i

    ifox

    12/23/2022, 7:15 PM
    @antonioribeiro tags field is not meant to be used inside of blocks, they are a polymorphic relationship for Twill models, not currently compatible with blocks (could become but we would have to decide the default behavior since right now the tags are scoped by model). I'd recommend creating your own tags module if you need tags that can be attached to anything including blocks.
  • i

    ifox

    12/24/2022, 1:25 AM
    Google oauth
  • i

    ifox

    12/24/2022, 1:26 AM
    By alias do you mean slug?
  • i

    ifox

    12/24/2022, 1:28 AM
    Hi @savchuk.ivan there is an open issue about this that we'll tackle on Twill 3. Validating is possible as you found but messages are currently not mapping correctly within repeaters in blocks.
  • a

    antonioribeiro

    12/24/2022, 10:58 AM
    Thanks @ifox !
  • k

    Keithp

    12/28/2022, 10:33 AM
    Hi, I am new in Twill, May I know if it is possible to use DatePicker inside a Block/Repeater? Since I have no idea how to add casting for it, it cannot show the stored value in nested form fields.
  • h

    Harings Rob

    12/28/2022, 10:34 AM
    hey @Keithp I assume you are on twill 3? Could you open an issue for this please?
  • k

    Keithp

    12/28/2022, 11:04 AM
    @Harings Rob Just update the comment in this issue https://github.com/area17/twill/issues/2025#issuecomment-1366564557
  • k

    kalle

    12/28/2022, 11:09 AM
    Where do you use values of datepicker? Block save values as they are, but where you use that data you can make casting which is basicly making a Carbon instance with that specific data provided.
  • k

    Keithp

    12/28/2022, 11:26 AM
    I cannot show the stored value on the edit page, it just shows as an empty field like this:
  • k

    kalle

    12/28/2022, 12:24 PM
    Date picker here is an actual datepicker or this is a input component?
  • k

    Keithp

    12/29/2022, 1:54 AM
    it is a date_picker created in the repeater by following:
    Copy code
    <x-twill::date_picker
        name="date_picker"
        label="Date Picker"
    />
  • b

    Bobert

    12/29/2022, 6:42 PM
    Are frontend themes available for Twill? I'm looking for something plug and play for a blog, ie. Wordpress built on Laravel.
  • b

    Bobert

    12/29/2022, 6:43 PM
    ...maybe templates is a better word.
  • k

    KyleAF

    12/31/2022, 5:43 AM
    Hello everyone! I never looked into emoji support, but one of my users recently tried to use them in a twill form, and when they clicked "update" to the model it did not update and it actually truncated off everything in the textarea input that was after the emoji (including the emoji). Has anyone seen this before?
  • h

    Harings Rob

    01/02/2023, 8:30 AM
    hey @KyleAF interesting case, please create an issue then I will look into it.
  • e

    Erwin

    01/02/2023, 1:03 PM
    Is there a list of standard icon strings i can use in @twillBlockIcon?
  • i

    ifox

    01/02/2023, 1:15 PM
    @Erwin you can visit
    /admin/icons
    to view all icons, the ones prefixed by b- being suitable for blocks:
    Copy code
    b-accordion
    b-activity
    b-audio
    b-button
    b-carousel
    b-checklist
    b-color
    b-date
    b-document
    b-grid-flex
    b-grid
    b-iframe
    b-image
    b-link
    b-mail
    b-membership
    b-people
    b-program
    b-quote
    b-table
    b-text-2col
    b-text-img
    b-text
    b-video
  • e

    Erwin

    01/02/2023, 1:26 PM
    great, thanks!
  • e

    Erwin

    01/02/2023, 1:37 PM
    Hey another question for something i cant seem to be able to find in the docs, a list of admin ui components that i would be able to use? Like if i want to place 2 input fields in a flex container next to each other, are there components available for that kind of use case?
  • i

    ifox

    01/02/2023, 1:48 PM
    https://github.com/area17/twill/blob/681a16dc814243ddc3d98b9a97ec489dc25bd37e/src/TwillServiceProvider.php#L447
  • i

    ifox

    01/02/2023, 1:48 PM
    You can use @formColumns
  • k

    KyleAF

    01/02/2023, 9:28 PM
    So when I first tried to solve this I only updated MySQL's encodings, and forgot about Laravel's database config file. Updating that as well made everything work perfectly. However this still doesn't explain why all text was being truncated back when everything was in the base "utf8" encoding before I had updated it to "utf8mb4" encoding. But that seems like a pretty niche scenario... do you want me to create an issue for you? Personally I'm not sure it's worth your time, haha.
  • o

    Olivier

    01/04/2023, 3:26 PM
    Question regarding the block editor (twill v2): Is it possible to have a flexible sub-blocks? Let's say I want to make a "list" block, and I want authors to be able to add any other blocks inside each list block element. Is that possible?
  • h

    Harings Rob

    01/04/2023, 3:26 PM
    With twill 2 this is not possible
  • h

    Harings Rob

    01/04/2023, 3:27 PM
    you can have repeaters in blocks but that's it.
1...441442443...484Latest