Populate a new list of checkboxes (multi Value) based on the input of another list of checkboxes (Multi Value)

14 posts by 2 authors in: Forums > CMS Builder
Last Post: January 17, 2017   (RSS)

By ross - January 16, 2017

Hi Andy

I see the issue. We actually need to use the "values" option in the foreach loop.

<?php foreach ($listing['property_features:values'] as $feature):               // loop through all features ?>
<?php $featureRecord = mysql_get("name of your new features table", $feature);  // load feature record ?>
<?php echo $featureRecord['es_feature'];                                        // display feature in language ?>
<?php endforeach ?>

I marked the change in blue.  

I also marked the original changes in red again.

You may still need to make additional changes to the code.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Hi Ross

Fantastic thanks!

That worked, I am now able to output all three languages for Features - great news.

You can see a demo at http://www.sunsetjavea.com/property/listingDetail_test_esp.php?248 

Scroll down to features and you will see all 3 languages outputted (English, Spanish, French)

Thanks for your help with this Ross, this opens up many more possibilities for me and will make the Admin side far easier to update now I have Features in a separate table

Cheers

Andy

By ross - January 17, 2017

Neat! I'm really glad that worked.

Keep me up to date with how you are making out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/