https://twill.io logo
Join Discord
Powered by
# ❓questions
  • i

    ifox

    10/17/2022, 3:38 PM
    @Bijen depending on the variance in fields inside your column repeater you could leverage conditional fields
  • j

    JeanSilva

    10/18/2022, 12:11 PM
    hi, I was fiddling with auth configs to increase the password expiration time. I've changed the array inside config/auth, but it seems to be not working. What I want is to increase the expiration time for when the reset token will become invalid for the user. Originaly it is 60 minutes, but I want to increase this for my client. I've tried testing reducing to 1 minute to see if it would invalidate the token after that time, but it didn't worked, I could still use the reset token. Currently this is the code inside config/auth.php (my client wants to have many days for token expiration):
    Copy code
    'passwords' => [
            'users' => [
                'provider' => 'users',
                'table' => 'password_resets',
                // 'expire' => 60,
                // 'expire' => 1,
                'expire' => 43200,
                'throttle' => 60,
            ],
        ],
    Is there some other config I must do? I've also tried running
    php artisan config:cache
    .
  • j

    jefsev

    10/18/2022, 12:19 PM
    He, could somebody give me a pointer. I'm using the jsonRepeaters version of the repeater field. Everything works but files don't work. Is there a way to add filed or medias to the jsonRepeaters.
  • h

    Harings Rob

    10/18/2022, 12:20 PM
    Json repeaters currently do not work with media/files/blocks
  • j

    jefsev

    10/18/2022, 12:21 PM
    Okay good to know 🙂
  • j

    jefsev

    10/18/2022, 12:21 PM
    thx
  • h

    Harings Rob

    10/18/2022, 12:22 PM
    Because there is no database definition, there is no way to refer to a file, as it requires a database relation to be there.
  • h

    Harings Rob

    10/18/2022, 12:24 PM
    If you just need media with additional information, you could use extra metadata: https://twill.io/docs/form-fields/medias.html#extra-metadatas
  • j

    jefsev

    10/18/2022, 12:24 PM
    I was hoping for it to work out of the box 😛 like so much else. But np ill do it another way. Loving Twill btw! 🙂 this i a live save for laravel websites that need content managment 😄
  • h

    Harings Rob

    10/18/2022, 12:24 PM
    Another alternative could be to use twill3.x and use nested blocks instead of a json repeater. But all depends on what you need.
  • j

    jefsev

    10/18/2022, 12:25 PM
    I will look into twill 3 soon. I'm introducing twill as a standard CMS for our laravel projects at the office 😎
  • i

    ifox

    10/18/2022, 12:33 PM
    Non-json repeaters are pretty simple to setup now too and give you all fields support and the ability to move to a standalone module if scalability of the repeater form becomes an issue.
  • k

    kalle

    10/18/2022, 12:39 PM
    Actualy Twill has own auth provider so you'll need to create own config value to achive this.
    Copy code
    php
    'passwords' => [
            'twill_users' => [
                    'provider' => 'twill_users',
                    'table' => config('twill.password_resets_table', 'twill_password_resets'),
                    'expire' => 60,
                    'throttle' => 60,
            ],
        ],
    So if this key is present, Twill will not publish own default config value. https://github.com/area17/twill/blob/293a06d521c45ff833246fda41ca7885a0a41983/src/TwillServiceProvider.php#L194 Your current changes affect only your Laravel application, nothing related to Twill is changed.
  • j

    JeanSilva

    10/18/2022, 12:56 PM
    thanks @kalle , I'm new to this project, I've "inherited" from a previous co-worker. I should've known the twill would use another config 😅
  • d

    devtutorum

    10/18/2022, 3:05 PM
    Hi. How do I enable gifs in Twill image upload?
  • i

    ifox

    10/18/2022, 3:08 PM
    Hi @devtutorum upload should work by default as gif is in the allowed extensions
  • i

    ifox

    10/18/2022, 3:08 PM
    you mean rendering maybe?
  • d

    devtutorum

    10/18/2022, 3:09 PM
    yes I can upload gif, just need to render it as gif aswell 👍
  • i

    ifox

    10/18/2022, 3:10 PM
    That would depend on your image rendering service but you can try adding gif to
    twill.media_library.original_media_for_extension
  • b

    BA7YA

    10/18/2022, 3:26 PM
    Hi Guys. Is it possible to pass data from Block to repeater?
  • i

    ifox

    10/18/2022, 3:27 PM
    hi @BA7YA when rendering or do you mean in the form?
  • b

    BA7YA

    10/18/2022, 5:19 PM
    I mean in the form 🙂
  • u

    uwascan

    10/18/2022, 7:08 PM
    Hello friends. I am have issues with conditional fields. I get an error each time even for examples on the Twill doc site
    Copy code
    Division by zero (View: D:\PROJECTS\PHP\test\resources\views\admin\pages\form.blade.php)
  • u

    uwascan

    10/18/2022, 7:11 PM
    support for media and file fields for json repeaters is so important. Any hope for support by the time 3.0 is released?. Any guidance on how to implement this?
  • i

    ifox

    10/18/2022, 7:24 PM
    Hi @uwascan I don't think so because as I said before, non-json repeaters support them perfectly fine. https://twill.io/docs/form-fields/repeater.html#using-repeater-fields
  • i

    ifox

    10/18/2022, 7:32 PM
    Can you share the code producing this? I doubt the docs snippets would
  • u

    uwascan

    10/18/2022, 8:13 PM
    This example from the Doc site in a form produces same error
    Copy code
    @formField('checkbox', [
        'name' => 'vertical_article',
        'label' => 'Vertical Story'
    ])
    
    @formConnectedFields([
        'fieldName' => 'vertical_article',
        'fieldValues' => true,
        'renderForBlocks' => true/false # (depending on regular form vs block form)
    ])
        @formField('medias', [
            'name' => 'vertical_image',
            'label' => 'Vertical Image',
        ])
    @endformConnectedFields
  • i

    ifox

    10/18/2022, 8:18 PM
    true/false, you need to pick one 😉
  • i

    ifox

    10/18/2022, 8:19 PM
    I guess a one to one copy paste breaks, but please give a read to the code you're pasting in your codebase, it will save you one day
  • u

    uwascan

    10/18/2022, 8:21 PM
    Silly me. Thanks.
1...417418419...484Latest