klox7 VIP
Total posts: 914
03 Dec 2013 02:55

Can Cobalt handle this?

Last Modified: 10 Apr 2015


Sergey
Total posts: 13,743
04 Dec 2013 01:28

I see. This is long discussed field and I believe it is a first field we will create nex when we create next field. But right now there are no options.


klox7 VIP
Total posts: 914
09 Apr 2015 12:06

Is this something that I could do for repetable fields? Click here to link...

For ex. create 1 text field and the repeat it in form?


pepperstreet VIP
Total posts: 3,834
09 Apr 2015 20:09

klox7 Is this something that I could do for repetable fields? Click here to link... For ex. create 1 text field and the repeat it in form?

That is the official Joomla core field solution. Most bugs have been solved since J3.2, AFAIK. Should be a possible solution, but I am not sure how the storage has to be done. My first guess is JSON format, because of multiple values...

Also hence the Cobalt URL field. Actually it provides a repeatable solution. Maybe you can create a simple variant of it ;)
BTW, in regards of URL field you might ask the user danielbidala for help and advice. See related topic over here...


danielbidala VIP
Total posts: 153
09 Apr 2015 21:58

I move that topic here. This is what I've done. This works perfect (there is no filter possibility, only search):

repeatable_field_cobalt

This field based on cobalt's URL Field type. You can add as many rows as you want.

You have to duplicate url field type. Copy than rename folder and files, modify function names etc.. For help read this: Click here to link...

The fields are created by a jQuery function what is defined in com_cobalt/fields/url/assets/url.js. Search the row starting with this: Url.prototype.createBlock. You have to add your fields in this function (use jQuery). Than remove all unnecessary functions and rows. Here is my function, what you can see in action on the picture above:

field_javascript

You can see in my case the fieldsets are table rows inside a table when you click +button one more table row are added. After url.js you have to modify field php files too (input, output, and url.php). There is lot of thing to do but if you are little bit familiar with jQuery and php you can solve this. I'm beiginner in each but we have only to modify. Ask if need help!


klox7 VIP
Total posts: 914
10 Apr 2015 08:21

Thanks both for your help. @danielbidala I will try to play around. Do you have any suggestions how to add an option for image in each row?

Powered by Cobalt