Forums

Edit a user

brononius 27 Aug, 2013
Hey,

I've got a site where joomla users can add options by CB.

I would like now to create a form that when an administrator click a link, they open these options, and they can edit them. This way, an administrator can maitain these options, they can add 'hidden comment'...

I was thinking of creating a form for this, which can be reached by a hyperlink (fe http://bladibladi/edituser&userid=XXX).
This link can then be used in different lists.


Any suggestions on it? How can I create that 'reachable hyperlink'?
GreyHead 27 Aug, 2013
Hi brononius,

I'm not clear what your question is?

If you call a form from a URL the values from the query string are added to the $form->data array by ChronoForms and can then be used in your form.

Bob
brononius 27 Aug, 2013
I want to create a form that reads the data of my users (different tables), and I should be able to update the data. fe:

userid: 435
username: brononius
cb_firstname: ben
cb_postal: 9890
email: ben@mydomain.com
userrights: administrator
cb_comment: This is a small example. And I want to change the status of cb_tick3.
cb_tick1: 0
cb_tick2: 1
cb_tick3: 0

<<<update button>>> <<<cancel button>>>





Once this is done, I would like to be able to use this directly in different lists. Once I click fe the username, I should go to the above edit form.

name - username - postal
Ben brononius 9890
Jan jantje 9000




So in fact, in the code something like <a href=/chronoformB&userid=435>username</a>


What's the easiest (or best) way to do this?
GreyHead 08 Sep, 2013
Hi brononius,

I don't know how you write data to CB tables but I imagine that you can do it with either a DB Save action (if it is a simple write); or by hand-coding the query if it is more complex than that.

Bob
brononius 09 Sep, 2013
Always difficult to try to explain it afterwards... :?

I created a form that did a lookup based on some values (fe name, certain field in CB...). This gives me a result with different colomns of all 'interesting' information. And in this, i've added an image with following shortcut behind it:
<a href=\"/component/chronoconnectivity/vwedit/cc_edit_data?cid=" . $row['id']  . "\"><img src=\"/images/buttons/update.gif\" width=\"100%\"></a>

(the $row['id'] is the id of the user found in the database)

And in the chronoconnectivity (vwedit), I point back to a 'custom' form to change the different fields.

And everything is working, except the password stuff. But this is another issue.
This topic is locked and no more replies can be posted.