CMYKreative Posted October 18, 2012 Share Posted October 18, 2012 I'm trying to hide some specific <tr> rows on the registration form in Virtuemart that are not needed, but there is no way to 'target' them as it uses the same piece of coding to create all the rows. What we have at the moment is: echo ' <table class="adminForm user-details">' . "\n"; $_table = true; } echo ' <tr>' . "\n"; echo ' <td class="key" title="'.$_field['description'].'" >' . "\n"; echo ' <label class="' . $_field['name'] . '" for="' . $_field['name'] . '_field">' . "\n"; echo ' ' . $_field['title'] . ($_field['required'] ? ' *' : '') . "\n"; Where the td class is simply called "key" and all td are then called the same. We are trying to add in some consecutive lettering functionality so that each row then gets labelled with a consecutive number. We've tried adding this into the top of the page: <?php // array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'); foreach (range('a', 'z') as $letter) ?> Which does generate consecutive letters, and then this change to the code: echo ' <td class="key td-id-'.$letter.'" title="'.$_field['description'].'" >' . "\n"; Any thoughts on how to get this to work? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/269606-phpvirtuemart-help-consecutive-numbering/ Share on other sites More sharing options...
Jessica Posted October 18, 2012 Share Posted October 18, 2012 You should be assigning the unique value as an ID, not a class. That said, what is the problem? Quote Link to comment https://forums.phpfreaks.com/topic/269606-phpvirtuemart-help-consecutive-numbering/#findComment-1385912 Share on other sites More sharing options...
jinijames Posted October 25, 2012 Share Posted October 25, 2012 (edited) <?php $this->execPieceByName('ff_InitUtilities'); $this->execPieceByName('ff_SubmitUtilities'); if (!function_exists('ff_selectValue')) $this->execPieceByName('ff_selectValue'); $value = ff_selectValue("SELECT count(*) FROM #__facileforms_records where form=15"); $value = ($value + 1); return "Your text".$value; ?> Thanks, Hire php developer | Hire magento developer Edited October 25, 2012 by jinijames Quote Link to comment https://forums.phpfreaks.com/topic/269606-phpvirtuemart-help-consecutive-numbering/#findComment-1387655 Share on other sites More sharing options...
MDCode Posted October 25, 2012 Share Posted October 25, 2012 That's not much of a description as to what the problem is. And please post your code using the tags Quote Link to comment https://forums.phpfreaks.com/topic/269606-phpvirtuemart-help-consecutive-numbering/#findComment-1387657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.