table view, button to change YesNo field value

ovillasmil

New Member
Hi all,

I have a custom fabrik_buttons toolbar section like (called from default_buttons tamplate inside a List view custom template):

<div class="fabrik_buttons">
<ul class="myitoolbar">
...
...
<li class="fabrikTip" opts="{notice:true}" title="<span><nobr><?php echo JText::_('MY_ADD_ITEM'); ?></nobr></span>">
<a href="<?php echo $this->addRecordLink;?>">
<img src="../../../../../images/icons/add32.png">
</a>
</li>
...
...

I'm able to reproduce all fabrik standard actions like Add, Delete, SelectAll, etc.

I wonder how can I set the value of a Boolean field in the TR, this field is controlled by a YesNo plugin using a button in the UL/LI section without the need to go to the edit form view, just updating that TR in that particular Boolean field.

Any one can provide some help on this? will appreciate it

Thanks,
O
 
why not use the updatecol list plugin which is available in the code @github?
 
there are no columns in the table, it is changed to show only the group label, and each row is like a product catalog (image, name, description and a boolean value)
 
but you can still use the plugin, all you need is to ensure your template shows the checkbox to select it
 
Thanks Rob for the suggestion.

Basically the functionality I'm looking for exist in administration lists, it is the column "Published" showing a checkmark/Xmark icon, and meaning Yes/No (I know you know this better than me, just trying to be accurate :) )

And what I'm trying to achieve is the same behavior: I don't have to go to the detail view of the record in order to Publish/Un-publish it, just click that icon, it will toggle to the other value updating the record at the same time.

Any suggestion of how to do this?

Thanks again in advance,
Omar
 
have you tried using the update column plugin - it does half of what you are after, as in it will set the state to published OR unpublished.
Otherwise there is the inline edit plugin that allows you to click on a cell/div and an contextual editor will open allowing you to alter the value. The plugin requires the mark up to have the same classes as the standard fabrik templates though so double check that first if you are using a custom template
 
Hi,

In order to close this thread, the solution was a new plugin that just toggle the value in the list changing the icon that represents 1/0.

In the form is a checkbox that I still cannot make to submit its value to the table :-(

Thanks,
O
 
Hi,

In order to close this thread, the solution was a new plugin that just toggle the value in the list changing the icon that represents 1/0.

In the form is a checkbox that I still cannot make to submit its value to the table :-(

Thanks,
O

Hi,

I would like to use this plugin. Which one it is?

Bye and thanks
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top