Forums

Show info for any users

vecchia 23 Jun, 2009
Hi all,
i created a form with chronoforms latest release that insert some values in a table, it works😀 now i want to show for the user that insert the values into the table his own records, how i can do it?
Max_admin 24 Jun, 2009
Hi,

ChronoConnectivity is the way to do this! :wink:

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vecchia 24 Jun, 2009
ok, i have a bug with chronoconnettivity, yesterday i tried to solve it with the solution posted on the forum but nothing, today it works after a clean reinstallation😀 but i have a question: how i can filter the data to show only the records that the user add and not all?
Max_admin 24 Jun, 2009

how i can filter the data to show only the records that the user add and not all?


using the WHERE SQL code, you need something like :
WHERE cf_user_id = '<?php $user =& JFactory::getUser(); echo $user->id; ?>'


Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vecchia 24 Jun, 2009
oh yea, it works! very good job, i love chronoform, chronoconnettivity and chronocomments😀 VERY GOOD SUPPORT, VERY GOOD EXTENSIONS
vecchia 24 Jun, 2009
mm i have another question: if i need to display only the own records i use that code and it works but if now i would that the admins can edit all the records in the table... how?
Max_admin 25 Jun, 2009
Thank you!🙂 please vote for us at the JED😉

In this case please remove the Where SQL and use this code in the header box:

<?php
$user =& JFactory::getUser(); 
if($MyRow->cf_user_id != $user->id)
return; 
?>


let me know, because if this didn't work then a core code updates are needed!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vecchia 26 Jun, 2009
wait wait... i want that the users can see only their own records and the first code it's ok for this... but i want that the admins can see and edit all the records, how i can do it?
gugely36 27 Jun, 2009
Hi Max,

as already mentioned, I have created 2 froms with CC, one that display's the data from the current user and the other form to display results from all the users in the DB. The first from works when selecting it from the User menu (MY data), the other one however I do not know How to somehow hide it so it does not display to all except to the admin or shows the option menu for the admin only.

Any ideas?

Michael
Max_admin 28 Jun, 2009
@vecchia, when you can make more than 1 connection then its better to do so, like in this case, make a connection for admins and another with SQL I suggested for users

@Michael, mmm, I think I need to add a view permissions per connection! will do in the coming release which will go out very soon!

Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vecchia 28 Jun, 2009
ok but how i must do to create a form that allow me to edit a record? i created a new form, but now?
gugely36 28 Jun, 2009
Hi Vecchia,

Read through these manuals, as they explain VERy nicely how to put what where, from Chrono Forms to Chrono connectuvity, adding a SQL, etc. If you want to edit a record then just put *{edit_record}* (add what is inbetween the * * only) in CC Body. when you display the form it will show you the Edit Record button.

http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=12324 reading at and then http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=13182&p=26730#p26730

p.s Also a newbee in CC and CF and with no coding background. But with Bob and Max as support it makes it allot easier.

Thanks you guys.

Michael
Max_admin 28 Jun, 2009
Hi Vecchia,

As Michael suggested, please read the tutorials, if you created a form for editing then choose it in the edit form dropdown!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
vecchia 28 Jun, 2009
yea but i don't understand how do the sql for edit the records🙄 this is my real problem🙄
Max_admin 30 Jun, 2009
Hi Vecchia,

You don't need any SQL code for the edit, you only specify the edit form and once you click the edit link it will open the edit page for you!

Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.