Home › Forums › Add-ons › Repeater Field › Repeater field elseif help › Reply To: Repeater field elseif help
Hi John,
Basiclally i have a php script which is this:
<?php
// Simple browser and OS detection script.
// This will not work if User Agent is false.
$agent = $_SERVER['HTTP_USER_AGENT'];
// Detect Device/Operating System
if(preg_match('/Linux/i',$agent)) $os = 'Linux';
elseif(preg_match('/Mac/i',$agent)) $os = 'Mac';
elseif(preg_match('/iPhone/i',$agent)) $os = 'iPhone';
elseif(preg_match('/iPad/i',$agent)) $os = 'iPad';
elseif(preg_match('/Droid/i',$agent)) $os = 'Droid';
elseif(preg_match('/Unix/i',$agent)) $os = 'Unix';
elseif(preg_match('/Windows/i',$agent)) $os = 'Windows';
else $os = 'Unknown';
?>
so i was going to use a repeater field to and create a sub field called:
Windows and another called: Linux and another called Macosx so if on a Windows it displays the Windows field. and if on a Linux computer it shows hte Linux Field etc.
Thanks
Aaron
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.