1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Value of an Element in PHP

Discussion in 'Community' started by smalldragoon, Mar 24, 2020.

  1. smalldragoon

    smalldragoon Member

    Level: Community
    I think I missing something in the logic of naming in Fabriks.
    if there is a documentation which explains clearly, feel free to point it to me. I foudn this one : http://fabrikar.com/forums/index.php?wiki/php-form-plugin/
    for my need :
    I need in PHP validation , before submiting to check a value.
    Context :
    I have a form, which contains 1 group (Addpayee).
    This group contains several elements ( with one named "requiredlvl").
    this element, is a display element, and I want to check its value.

    My understanding is that, during PHP validation, I should get the value thanks to


    but obviously nothing....
    Thanks for your insights
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
  3. smalldragoon

    smalldragoon Member

    Level: Community
    mmm... Thanks for the link , I had a look as well.

    I tried previously a " var_dump($formModel->formData["AddPayee___requiredlvl"]" , without success, no output at all. That's why I though I was missing something.

    Just to be sure, if you see any trick in my code :

    JFactory::getApplication()->enqueueMessage('val: ' . var_dump($formModel->formData['AddPayee___requiredlvl']), 'error');

    i'm getting the message in the message queue and displayed , but no var_dump ( nor value with _raw )
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    I don't know.
    resp. to see all
  5. smalldragoon

    smalldragoon Member

    Level: Community
    Finally found the issue. For some reasons ( do not really get it but never mind) , vardump are not displayed with my current template.
    I was looping to the var_dump without "exit" being sure of my code ...
    Final issue is that the group when I created it was named "test", so ... the right variable value was :
    Thx for your help !

Share This Page