• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP Help - Checkboxes with input boxes

LuckyTaxi

Diamond Member
Let's say I have the following. Next to each option, there's an input box where one inserts how much each delivery method cost. How do I associate each delivery method with its own price?

[] In-Room (49)
[] Curbside (30)
[] White Glove (100)

 
Just use the ID from the checkbox, see if it has been checked or not.

i.e.
$in_room=$_POST['in_room'];

if($in_room) { ... }

P.S. depending on what you want, if this is for a delivery system, you might want to use radios instead of checkboxes
 
as of right now, they are not built dynamically but COULD change in the future. I just know the shipping_id off the top of my head.

oh and this is for the backend admin so i'm using checkboxes to select what's available for a particular item.
 
Back
Top