Hidden Column (but hidden by the back end)

Hidden Column (but hidden by the back end)

naktunaktu Posts: 6Questions: 4Answers: 0
edited May 2018 in Editor

Found this under security.
->set( $_SESSION['access']['editing'] ). At the server script file thatis linked to front-end editor i have to users id which i extract from joomla instance. So every user can only see their rows (if rows->userid is their id in joomla->user.id) . I did this via ->where( 'userid', $id ) . If user insert a row userid field must be their id via ->setValue( $id ).

This is the end of schema.

    Field::inst( 'somefields' ),
    Field::inst( 'userid' )->setValue( $id )
)->where( 'userid', $id )
->process( $_POST )
->json();
  • Each user should see the rows with their id on.
  • When user add a row it must have user's id.

Up to this point everything is fine. I found "hide Column" option. However I am trying to not even send this information to front end.

How can i achieve this ?

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓
    Field::inst( 'userid' )
      ->get( false )
      ->setValue( $id )
    

    should do it.

    Allan

This discussion has been closed.