1

Topic: Responsive species grid

Hi

has anyone tested species grid in dynamic_samples_occurrences form in conjunction with responsive columns?
It works very well when doing this via the function get species checklist options in data_entry_helper.php:
responsive => true
'responsiveCols' => array(
          'sensitive' => array(
            'phone' => true,
            'tablet-portrait' => true,
          ),
Works fine.

I would prefer to do this via the UI in dynamic_samples_occurrences form
@responsive=true
@responsiveCols={"sensitive":"{\"tablet-landscape\":true}"}
Does not work.

Any idea?

Best wishes
Jürgen

2

Re: Responsive species grid

Hi Jürgen

We have used it on this form, http://www.brc.ac.uk/irecord/enter-record-list and configured it via the UI.
My configuration looks like the following.

[species]
@responsive=true
@responsiveOpts={"breakpoints": {"ph": 480, "tp": 768, "tl": 1024}}
@responsiveCols={"attr54": {"ph": true}, "attr93": {}, "attr105": {"ph": true, "tp": true}, "attr106": {"ph": true, "tp": true},  "attr18": {"ph": true, "tp": true}, "comment": {"ph": true, "tp": true, "tl": true},"media": {"ph": true, "tp": true}}

I renamed the breakpoints for brevity but this is not necessary.

Looks to me like you just need to change the inverted commas in your JSON to
@responsiveCols={"sensitive": {"tablet-landscape":true}}

Jim Bacon.

3

Re: Responsive species grid

Hi Jim,

thanks a lot, it works.

Best wishes
Jürgen