·
Added a discussion

Hello there,

I have added customized fields for persons via Account --> Studio --> Fields --> Select module: Persons --> Select display: View person

I would like to show in the person view such customized fields but only if their value is different from a specific string. I would like to be able to put a sort of "if condition" on those specific fields, so that they can be shown in the profile view only if tha condition is respected.

Regular expressions seem to be valid only to assign the value and not to retrieve and print it.

Any suggestion?

  • 1128
Comments
    • Hello lucia.vaira !

      For now, it's possible to do only via Javascript / JQuery code injections (Studio->Designer->Injections area) but this code will be added on every page. Other way - modify the code of Persons files (like modules/boonex/persons/classes/BxPersonsPageEntry.php) but this is not good for the automatic upgrades.

      • Hello Leonid.
        First of all, thank you for your answer.
        Unfortunately your suggestion was not working and at the end I have added a raw Block into the Studio --> Pages -->Persons--> View Profile where I have put the Javascript code that allows to obtain the desired result.
        Thank you again and I hope that this could be useful also for other users.

        Login or Join to comment.