Allow adding data to textbox but not editing with Fabrik on Joomla? - joomla

I am displaying lists using the Fabrik system with Joomla on my website and want the users to be able to add information to each row but not be able to delete anything. Currently I have it setup so that a user can click the edit button but that allows them to edit all of the data in a large textbox. I just want them to be able to add information to the textbox but not delete pre-existing information. Any help is greatly appreciated! I am using the most recent versions of Joomla and Fabri

Humm if I well understand: not easy (and maybe not advised).
An idea:
A new Calc field recovers and displays the current value from your field.
A Custom PHP in your field (Advanced tab) empties your field. Finally, just after submission a Php Form Plugin changes your field adding the Calc Field concatenated with the new current value from your field.
But really I think it is not advised. Not because Joomla or Fabrik or PHP, but because ... the interest of database applications.
You would prefer to create a linked table, in your List options, Data, Join.
Add your new table as repeatable.
Go in Group, find your original List, find the new group related and set up the options.
I guarantee you that finally you will be able to do what you want, but benefiting from much more possibilities (date of edit, user edit, ACL according to user rights ...).

I would add a second field for new data and create a trigger to add this information to the already existing information upon update of the row

Related

Dynamic content display

when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.

On Joomla, how to show multiple editable articles on the same page?

I have a static website, which I want to make editable by the client. So, I decided to rebuild the website using Joomla. The current static home page uses Zurb's Foundation to display the contents in the following layout.
1st Row: 1 column,
2nd Row: 2 columns,
3rd Row: 1 column
Using Joomal, I have thought of the following options.
the whole page is 1 article: the client would need to understand html, to be able to maintain div's and classes. Isn't it?
Each column on the page (1 column on the 1st row + 2 columns on the 2nd row + 1 column on the 3rd row) is an article that the client can edit. In effect, the page displays the full contents of 4 articles in the above layout.
I think the 2nd option is the way to go. However, I could not figure out how to display multiple, FULL, EDITABLE articles on the same page. I looked at the extension (Articles Anywhere - https://extensions.joomla.org/extension/articles-anywhere). However, it seems that although this extension can display articles, they won't be editable by authorised users.
Your effort and time to answer my question are highly appreciated...
Throughout the last few days, I managed to achieve what I asked about. I thought of documenting it here for the benefit of others.
Let's say we want to create a page, which looks like the following.
1st Row has 1 column: Part-r1-c1
2nd Row has 2 columns: Part-r2-c1 & Part-r2-c2
3rd Row has 1 column: Part-r3-c1
Basically, you need to do the following.
Create a template having module positions for each "Part" of your page layout. Let's call this template "Custom Template". So, you will need to create 4 positions:
Part-r1-c1
Part-r2-c1
Part-r2-c2
Part-r3-c1
Creating a custom template is an involved process with quite a learning curve. You need to be patient until you understand how Joomla templates work. I suggest referring to the official documentation and some tutorial videos/articles. I found the following useful.
Convert an HTML Template to Joomla 2.5/3.0 (3-parts YouTube Video): https://www.youtube.com/watch?v=E13QMWgvwlA&t=3s
https://docs.joomla.org/Creating_a_basic_Joomla!_template
As an alternative to creating your own template, you can use a Template Extension (or framework). I like T3-Framework http://www.t3-framework.org/.
However, in my opinion, investing time in understanding how Joomla templates work has much higher return on investment than understanding how to customise/customize an existing framework. To build your own template, you need to be comfortable with changing php and xml files though.
Create an empty article, and call it something like "Dummy Article".
Create a menu item for your page, e.g. "Services". The type of this menu item should be "single article". Choose the "Dummy Article", which you created above, as the article to be displayed. Assign "Custom Template" to this menu item.
Create an article for each Part of your page, in which you will write the contents, which your customer would be able to change.
Create a module for each Part, and assign it to the related position of the layout, and insert the related article into this module. Inserting articles into modules is not part of standard Joomla (at the current version 3.6.4). To insert articles into modules, you need to use a Joomla extension, like https://extensions.joomla.org/extensions/extension/news-display/articles-anywhere/.
That's it.
I discovered the need for another feature, which I missed asking about in my question. I wanted to make some Parts, which are not editable by the customer. Here's how I did it.
Create a category for articles, which you don't want your customer to change. Let's call it "Protected". Change the permissions for this category to Deny access to Editors (with the assumption that you are going to provide your customer with an Editor User ID.)
Create articles for each Part of your page, in which you will write the contents, which your customer CANNOT change. Categorise these articles as "Protected."
Good Luck!
To display multiple articles on a page you can use the category blog view or the featured view or (with customization) the tagged items view. However you must not use "read more" within the articles. Make sure that the option to display edit icon is turned on and that you are logged in as a user with edit privileges for all of the articles in question. If you are an administrator, publisher or editor by default you will have these.

Xpages valuePicker add value

Is there a way to add a field into the valuePicker with the possibility of adding new values in it? The valuePicker get's the values from a view, and I wouldn't want to add another addButton to add some values withing that view, in separate way. I would like a dialogBox like the valuePicker + the option to add new documents withing it. It is possible?
That functionality isn't available in the Value Picker. It's unlikely to be added, because of the variety of dataProviders, which makes it difficult to know where to add the option to make it available to other documents, and also ensure validation of options.
Typeahead on an Edit Box control allows you to add entries not in the list.
Alternatively, you can add a separate Edit Box to your XPage to include a value not in the list. But if you want to store the new option in the same field, you'll need to write the code to add the option to the source of the list. E.g. if it's the dataProvider of your Value Picker is a dominoViewValuePicker, you'll need to create a document in that view as well; if it's a simpleValuePicker, you'll need to compute the options so they also look to this field. Otherwise, when the user edits the document again, the option will not be available in the list, so may get removed.
Why do you want the user to insert new values into a field in valuePicker? Instead, let the user add the new value direct into the field which is the valuePicker related to.

Cannot set selected elements for the list module on Joomla Fabrik extension

I am using free version of Fabrik extension on Joomla. Both my Joomla and Fabrik are the latest version
I have already done with the Fabrik structure part such as create the form, elements, group, list, and set the form order, validations, appearance, and make them all works. Any registered user can submit the data using the form and it'll be stored into a table on the database
On the front-end, the idea is the user can view two different list view modules through his/her profile, a private list and a public list
Module A lists only entries submitted by the user. The list show the whole entry's data
Module B lists all of the entries submitted by everyone. The list show only selected data from selected field from each entry
This where the problem came from. When I gonna create a module for the list view (Fabrik List Module)
Module Manager > New > Fabrik List Module > Advanced
After I set the title and the list, when I clicked on the 'Select' button for attribute 'Elements', it just response me like I just clicked on 'Cancel', and redirect me to the modules list table instead. If it is just an unfixed bug, I can do nothing about it, but I guess it'll be a lot easier if I can just set something directly using database admin
Finally, after some little hacking, i've succesfully figured it out. Go to [pre]_menu.params (for menu item) or [pre]_modules.contents (for module), and you'll see some json like this
{"calculations":"0","listlayout":"bootstrap","resetfilters":"0","list_elements":"null", ....}
Just replace list_elements value from "null" to this
"{\"show_in_list\":[...]}"
[...] contains the list of elements id (inside table [pre]_fabrik_elements) we want to select them on module view, for example [1,2,3,4,5]
updated :
It's very unpractical solution to just modify the joomla data directly on database. Actually, especially in similar case to mine (sure it is a bug), you can select the elements for a list view (as asked) by simply creating a new separated list apart from the auto generated list which is generated by default on form creation.
That new list will automatically generate new set of elements with new ID based on database table structure, and plus they will not shared their setting with the default list. Alter the default list should definitely be avoid as it will totally change the behavior of the form
On the new list, you can simply un-"show in list" any elements you don't want to show, and create either menu item or module linked to the new list. This is also the best way if you want to alter the list displaying such as change the list header field title, change the list description, or join others elements to the list

Search View For Admin In magento

I have created a Sample Module (Admin Side) in Magento.. I managed To created a form and Then Stored the form field values in Database. Now I am trying To create a search view for that. to show me all the values which i have stored in my table. however i am not able to get it. when i press the tab I directly get the form view. I want the search view first and a button there which ll direct me to this form. I want it the same way as it is for product, category or any other module. Do anyone Know How can I do it.
It's called a grid. The process is kind of long to explain here, but if you search online there are a few tutorials that explain how to do it (here's one that I found useful: http://www.webspeaks.in/2010/08/create-admin-backend-module-in-magento.html). Keep in mind that you can also model your own code after core code. If you want to make a grid like the Category grid, then go look in the code how its made.

Resources