8 years ago
5
Topic

How to get checkbox values, Any Ideas. It cant be renderField or getText as it should be a array, i have no clue. has SEBLOD has a solution?

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
4
Level 1

8 years ago
3
Level 2

Thank you so much. Im creating the template to display these fields. But can you please show me an example of getting checkbox value display similar like text field (renderField)

Thank you again for posting on my thread and SEBLOD is amazing, I'm still exploring the features.

4229 Posts
Kadministrator
8 years ago
2
Level 3

Hi,

anything you need is explained in the manual I attached in my last response

8 years ago
1
Level 4

Thank you so much for the post. But i cant couldnt get the value rendered for checkbox display like 

Keywords : Data 1, Data 2, Data 3, Data 4

So I was thinking about getting to a variable and print the variable

$ai = array($cck->getValue('dynamicfieldname'));

Have not tried this yet. But if you have better solution can you please guide me to resolve this.

1283 Posts
Bucklash
8 years ago
0
Level 5

Hi

I think you would have to use the overide method, then:

get csv field value 

$csvField = $cck->getValue('my_csv_field') // $csvField = "1,2,3,4,5,6";

$arr = explode(",", $csvField);

Then do a foreach loop on $csvArray and add it to an outputArray

$outputArray = '';


foreach ($arr as $value) {

   $outputArray .= '<h2>' . $value . '</h2>;
}

echo $outputArray;

Get a VIP membership