• Sano

    Sano - 2012-04-18

    Hello everyone!
    Does anybody know how to use "setRequiredField" property? I mean where and when the application uses this condition, and also it's interesting how exactly it is used (simply nonempty condition?)?
    Best regards!

  • Sano

    Sano - 2012-04-18

    P.S.  I know that everything is kinda obvious, BUT i use setRequired on the field I built, and then call "validateFields" user pushes a button, and application just passes the empty value

  • Edgar Joel Rodriguez Avalos

    The required property is verified on the saveRow() event. validateFields() is a function that return true if all the 'required' fields are not empty. Must be used as a conditioner before saveRow().

    If you need validate something after exit the field, must be use validators, Search in the forum for examples.

    Eddie (Edgar Joel Rodríguez Ávalos)

  • croaker___

    croaker___ - 2012-04-18

    If you can post some code we might be able to see where the problem is.

  • Sano

    Sano - 2012-04-19

    Thank you for answering yet it didn't help, the most obvious example I have is "Products catalogue"… I tried to repeat but it didn't work out. So…..
    I have somathing like this:

    $this->build("p4a_field", "number_f")


    $this->build("p4a_button", "save_but")

    and then :

    public function save_row()
    //getting values and then

    Buuuuuuuuuuuuuuut, it just does nothing, and I so much wanted it looked like in "Products catalogue" like red rectangulars… ^_^

  • Sano

    Sano - 2012-04-23

    I just wonder if I can use created fields for the SetRequired or i must use like $this->fields ,i.e. loaded???


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks