Can we set setFormatter( 'Format::nullEmpty' ) as default formatter for all fields?

Can we set setFormatter( 'Format::nullEmpty' ) as default formatter for all fields?

zajczajc Posts: 67Questions: 10Answers: 2

This is how is done for individual fields.

        Field::inst( 'cert_sif_nas.csnas_mid' )
            ->setFormatter( 'Format::nullEmpty' ),

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,824Questions: 1Answers: 10,129 Site admin

    Exactly as you have done. I'm afraid I don't really under stand the question. You have used the nullEmpty formatter for am individual field in the above code.

    Allan

  • zajczajc Posts: 67Questions: 10Answers: 2

    Well, my question was really unclear ;-) Sorry.

    My real question is can we globally set (only one time) setFormatter( 'Format::nullEmpty' ) for fields as default formatter?

  • allanallan Posts: 61,824Questions: 1Answers: 10,129 Site admin
    Answer ✓

    Oh I see - sorry. There is no option to set defaults using the Editor PHP libraries at this time - sorry.

    Allan

This discussion has been closed.