in reply to How do I pull HTML form option values?
use strict; use warnings; my $v= [ bless( { 'class' => 'c-form__select', 'current' => 0, 'id' => 'radius', 'menu' => [ { 'name' => 'Distance (national)', 'value' => '1', 'seen' => 1 } ], 'type' => 'option', 'aria-label' => 'Choose a distance from your postco +de', 'name' => 'radius', 'idx' => 1 }, 'HTML::Form::ListInput' ), bless( { }, 'HTML::Form::ListInput' ), bless( { }, 'HTML::Form::ListInput' ), bless( { }, 'HTML::Form::ListInput' ) ]; my $LookForName = 'radius'; for my $entry (grep {$_->{name} and $_->{name} eq $LookForName} @$v) +{ print "Found $LookForName:\n"; for my $menuItem (@{ $entry->{menu} }){ print "\tValue:",$menuItem->{value},"\n"; } }
Memory fault -- brain fried
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I pull HTML form option values?
by unklejunky (Initiate) on Apr 03, 2018 at 18:56 UTC | |
by NetWallah (Canon) on Apr 04, 2018 at 05:50 UTC | |
by beech (Parson) on Apr 04, 2018 at 21:55 UTC | |
by NetWallah (Canon) on Apr 05, 2018 at 05:49 UTC | |
by beech (Parson) on Apr 07, 2018 at 02:44 UTC |