Support the ongoing development of Laravel.io →
posted 10 years ago
Forms
Last updated 2 years ago.
0

Well, radio buttons can have a value attribute just like most other form elements. You can do something as simple as this:

<input type="radio" name="thefields" value="show_id1,title_id1">
<input type="radio" name="thefields" value="show_id2,title_id2">
etc

Then when you process the submit, you can do:

$fields = explode(',', Input::get('thefields'));
if (count($fields) == 2)
{
    // carry on here...
    $show_id = intval($fields[0]);
    $title_id = intval($fields[1]);
    // etc...
}
else
{
    // handle error
}
Last updated 2 years ago.
0

That worked! Thank you very much.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jerauf jerauf Joined 16 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.