FIlter out an entry
Permalink
I've a form that currently displays check boxes from a range in an attribute on concrete5.6. What I need to do is to take that list, but now filter out one item. I want to filter out mpdID of 81. The code used on the page is:
<div class="clearfix"> <strong><?php echo t('Choose Day')?></strong> <?php if($price_dates){ foreach($price_dates->dates as $break){ ?> <div class="input"> <input type="checkbox" name="mdpID[]" value="<?=$break['mdpID']?>" <?php if($ticketID['mdpID'] == $break['mdpID']){echo 'checked';}?>/> <?=date('D M jS',strtotime($break['date']))?> - £<?=$break['price']?> </div> <?php } } ?> </div>
You should be able to just do
Viewing 15 lines of 16 lines. View entire code block.
Hi
Absolutely spot on. Thank you.
Justyn
> On 2 Mar 2018, at 00:34, concrete5 Community <discussions@concretecms.com> wrote:
Absolutely spot on. Thank you.
Justyn
> On 2 Mar 2018, at 00:34, concrete5 Community <discussions@concretecms.com> wrote:
Do you think it would be possible for it to filter out that entry if the number of counts of that mdpID value (81) on a related table (atTickets) reached a certain number (ie 250)?
Yes, I'm sure that would be possible but I would need to see the rest of the code around this functionality to help you write something to do it, there is not enough information in this post.
Will DM you.