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

    amargoCactus

    09/28/2022, 4:33 PM
    Inside a block?
  • i

    ifox

    09/28/2022, 10:18 PM
    Hi @amargoCactus that won't work, no. Are you looking for that field to find existing tags for the native tags model, or just the functionality of a free form multiselect field?
  • a

    amargoCactus

    09/28/2022, 10:44 PM
    The first one
  • e

    epicuristic

    09/29/2022, 3:23 AM
    got it, thanks! Also, is there any ways to unlimit maximum browser attached items? I mean, I can limit by 999, but it doesn't look good
  • a

    afatmustafa

    09/29/2022, 7:40 AM
    Hi has anyone had this error while logging into the admin panel before?
  • m

    mateoD

    09/29/2022, 7:52 AM
    hello guys , i want to make a validation to email form, i am using type email but it isn't working can you help me with this ?
    Copy code
    @formField('input', [
    'name' => 'email',
    'label' => 'Email',
    'maxlength' => 100,
    'required' => true,
    'type' => 'email',
    'placeholder' => 'Email',
    ])
  • h

    Harings Rob

    09/29/2022, 7:53 AM
    Have never seen this, what version are you on?
  • m

    mateoD

    09/29/2022, 7:54 AM
    2.9
  • h

    Harings Rob

    09/29/2022, 7:54 AM
    Is this a block or regular form? https://twill.io/docs/crud-modules/form-requests.html
  • m

    mateoD

    09/29/2022, 7:54 AM
    yes is block
  • m

    mateoD

    09/29/2022, 7:56 AM
    i tryed and rules to form request and it isnt uorking
    Copy code
    public function rulesForCreate()
    {
        return ['block.*.email'=> 'required'];
    }
  • h

    Harings Rob

    09/29/2022, 7:56 AM
    https://twill.io/docs/block-editor/validating-blocks.html#validating-blocks
  • m

    mateoD

    09/29/2022, 7:58 AM
    is for required but the email form must be an email thats the matter
  • h

    Harings Rob

    09/29/2022, 8:00 AM
    Copy code
    php
    @twillBlockValidationRules([
        'email' => 'required|email'
    ])
    In that case.
  • m

    mateoD

    09/29/2022, 8:02 AM
    thnk you is working now
  • h

    Harings Rob

    09/29/2022, 8:03 AM
    This takes regular laravel validation rules, Make sure to check them out 🙂
  • a

    afatmustafa

    09/29/2022, 10:14 AM
    Yes me to, 2.9.0
  • h

    Harings Rob

    09/29/2022, 10:16 AM
    Anything changed? New project? That error should not "just" happen if you know what I mean.
  • a

    afatmustafa

    09/29/2022, 11:09 AM
    I don't get it either, it gives a one-time error every time a login is made.
  • i

    ifox

    09/29/2022, 4:35 PM
    @afatmustafa you probably did that already, but do you find a call to an
    authentications
    method in your code?
  • t

    tfilos

    09/29/2022, 9:34 PM
    Hey, just out of curiosity, is there a way in the params of $block->image() to tell ImageMagick what image format to create? E.g. webp, for example
  • t

    tfilos

    09/29/2022, 9:35 PM
    Anyways, thought just occurred to me
  • t

    tfilos

    09/29/2022, 9:35 PM
    Or Glide rather
  • t

    tfilos

    09/29/2022, 9:37 PM
    I guess in general it would be nice to see a list of the possible params in the docs.
  • i

    ifox

    09/29/2022, 9:41 PM
    so the third param of the image helper is an array of params. Features behind those params depend on your image rendering service. So for Glide, they are here: https://glide.thephpleague.com/2.0/api/quick-reference/
  • i

    ifox

    09/29/2022, 9:41 PM
    https://twill.io/docs/api/2.x/A17/Twill/Models/Behaviors/HasMedias.html#method_image
  • c

    ckmirafss

    09/29/2022, 9:57 PM
    Hi, how do we Hash passwords? It just saves string when saving. BTW, I am using another database for this, not the usual twill_users. I just separated the users and admin database. TIA!Hi, how do we Hash passwords? It just saves string when saving. BTW, I am using another database for this, not the usual twill_users. I just separated the users and admin database. TIA!
  • k

    kalle

    09/29/2022, 10:29 PM
    Is this a block or module? If this is a module you can hook it in the Repository. You can override specific method like
    prepareFieldsBeforeCreate
    ,
    prepareFieldsBeforeSave
    to hash your password field before inserting. And after that in the same method call the parent method to finish the request.
  • i

    ifox

    09/29/2022, 10:30 PM
    a setter on the model could work too
  • c

    ckmirafss

    09/29/2022, 10:30 PM
    Yes sir, do you have reference?
1...409410411...484Latest