Get element value in php plugin list view

Status
Not open for further replies.
Hello :D
In my "Or?amentos" list I have an element called "agarra_valor" which has a value that I need to retrieve everytime the user clicks in the php button.
In my PHP code I have this:View attachment 17190
Which basically updates a value into that "agarra_valor" that I need.
I need to get that value in JS so I can use it in the window.open method! How can I achieve this?
Thanks in advance!
 
In your php code you need to first get the list of checked records in your php list:

Code:
    /* Get the list of records to work on */
    $app = JFactory::getApplication();
    $ids= $app->input->get('ids', array(), 'array');

Then for each ID :
Code:
foreach ($ids AS $myid)
{
    $row = $model->getRow($myid);
    $agarra_valor = $row->fzmms_quotation___agarra_valor;
    $element_raw = $row->fzmms_quotation___agarra_valor;

    .... rest of your php code to store the appropriate value in the database
}

More detail here: http://fabrikar.com/forums/index.php?wiki/php-list-plugin/
 
Hm, I appreciate your answer. My goal tho is to read the variable stored in the db using JS so I can window.open it :p In php I can retrieve the value from db perfectly ;)
 
I found a solution ahah, but thanks anyways!
PHP:
jQuery.each(rows, function(rowid, row) {
window.open('../'+row.database_table___element);
})
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top