1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Custom templates ...edit/delete

Discussion in 'Community Support' started by jordan79, Apr 18, 2007.

  1. jordan79

    jordan79 New Member

    Level: Standard
    Similar to previous post by Impalah Shenzhou.

    1. With regard to custom templates, is it possible to have conditional statements so that certain html i.e. (checkboxes for delete purposes) can be rendered if the user has the correct privileges.

    At the moment I have it set up so that the user has to have special privileges in order to link through to a detailed view where they can make edits. Thats fine. I can also draw checkboxes with the primary key field populating the value attribute for delete purposes. What I cannot control is when these checkboxes get displayed. And they just become redundant on the page when the user does not have the correct privileges.

    2. Also I have a date selector in my form which as you know expects dates in the following format: Y-m-d . But because I have specified my date element in fabrik to display like y-M-j-D it populates the date selector with this format in edit view which creates a conflict with the selector. And when I just click save the date reverts back to 0000-00-00 in the database. So I guess the question is how can I convert y-M-j-D into Y-m-d during edit mode.

    I know thats a bit of a mouthful...sorry guys
  2. rob

    rob Administrator Staff Member

    Level: Community

    For 1, no theres currently no template variable which defines the user access level. However, for elements you can set their individual access level by editing the element, selecting the "publishing" tab and setting the "Access level" option to what you need. Note that iby setting the "Read only access" option to be lower than the access level, when a user comes to edit the record who has rights only to read that element, then the element is replaced with plain text containing that elements data.

    For the view/delete of records this should be managed from within the tables access tab.

    For the date formatting your right, I think its best when using the date picker to default back to the site's default date handling. To do this open /components/com_fabrik/fabrik.html.php and around line 3216 replace:

    Code (Text):

            if($value != ''){
                $value = date( $format, strtotime($value));

    Code (Text):

            if($value != ''){
                //$value = date( $format, strtotime($value));
    This change will be done also for the release of 1.0.4


Share This Page