Thanks for quick response Jason.
I've attempted the first part, adding the form tags around my repeating DIV (table) and configuring the radio button with the value set to the image index. Thus..
<label class="label_radio" for="radio-01"><input name="PrimeImage" id="PrimeImage" value="<?php echo $row_ShowMyPics['hopicsidx']; ?>" type="radio" /> Set as Primary</label>
Where the binded value
<?php echo $row_ShowMyPics['hopicsidx']; ?>
is returned from my image recordset.
However, when applied and run, each radio button stays selected as each is clicked on. Not expected behaviour.
I want to get this right before moving onto second part of solution.
Below is the form content
<form action="" method="post" id="contact-form" class="contactForm">
<ul id="portfolio-list">
<?php if ($totalRows_ShowMyPics > 0) { // Show if recordset not empty ?>
<?php do { ?> <?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_ShowMyPics){
?><li class="<?php echo $row_ShowMyPics['hopicname']; ?>">
<?php
if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1334080310087
ob_start();
?><img src="<?php echo $row_ShowMyPics['hopicfolder']; ?><?php echo $row_ShowMyPics['hopicimagename']; ?>" alt="Click for full photo" width="200" height="200" ><p class="item-title">
<?php
echo(getCachedResizedImageHTML(ob_get_clean(), "../../../image_cache", "crop", "", false));
} // End Cached Resized Image: ImageCacheInstance_1334080310087
?><span class="tag-status" style="line-height:20px;"><img src="../../images/tag-icon.png" alt="" style="width:16px; height:16px;"><?php echo $row_ShowMyPics['hopicname']; ?> [<?php echo $row_ShowMyPics['hopicsidx']; ?>]</span> </br>
<p><?php echo $row_ShowMyPics['hopicimagename']; ?></p>
<div class="overlay"><a href="managepic1.php?PID=<?php echo $row_ShowMyPics['hopicsidx']; ?>"></a>Click to edit</div>
<div class="colorbox"></div>
<label class="label_radio" for="radio-01"><input name="PrimeImage" id="PrimeImage" value="<?php echo $row_ShowMyPics['hopicsidx']; ?>" type="radio" /> Primary</label>
<br/>
</li><?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?><li><?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_ShowMyPics && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_ShowMyPics = mysql_fetch_assoc($ShowMyPics);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
<?php } while ($row_ShowMyPics = mysql_fetch_assoc($ShowMyPics)); ?>
<?php } // Show if recordset not empty ?>
</li></ul></form>
The form as you will notice isnt set to do anything for this issue. It also uses WA Image resizer, but I'm not aware thats affecting anything.
Any ideas why I'm getting this behaviour?
Thanks, Paul