andy12 Posted December 30, 2013 Share Posted December 30, 2013 I am trying to make a minor change to a page. As it is, the users can write the number of days their post will stay on the site. I want to limit this to a list on drop down menu that give them 2, 3, 4, 5, 6 days only. the existing code reads: div id="options"> <div class="section"> <ul> <li> <label><p><?php echo LANG::_('Post_Length')?></b><b class="req">*</b></label> <input class="txt" style="width:30px" maxlength="3" type="text" name="duration" value="" /> <?= LANG::_('days')?>.</p> </li> </ul> <p><?= LANG::_('Post_Length_for')?> <span id="category_name"></span> <?= LANG::_('should_be')?> <span id="suggested_length"></span>.</p> </div> Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/ Share on other sites More sharing options...
requinix Posted December 30, 2013 Share Posted December 30, 2013 So what have you tried? Ever used a before? Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463362 Share on other sites More sharing options...
andy12 Posted December 30, 2013 Author Share Posted December 30, 2013 Not really, I copied few lines i found on some site and replaced <input class="txt" style="width:30px" maxlength="3" type="text" name="duration" value="" /> with it but didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463367 Share on other sites More sharing options...
requinix Posted December 31, 2013 Share Posted December 31, 2013 And what exactly did you try? If you missed it, I'm trying to help you figure out the answer, not just give you the answer and send you off. Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463375 Share on other sites More sharing options...
andy12 Posted December 31, 2013 Author Share Posted December 31, 2013 <select name="days" id="days"><option value="1">1</option><option value="3">3</option><option value="4">5</option></select> I tried the above, can get the drop down to display but won't move to next page. So the numbers don't register in DB. Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463377 Share on other sites More sharing options...
requinix Posted December 31, 2013 Share Posted December 31, 2013 The field is called "duration", not "days". Remember that all you're doing is changing how the user picks the value - you're not actually changing the structures or the names of anything. Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463381 Share on other sites More sharing options...
andy12 Posted December 31, 2013 Author Share Posted December 31, 2013 So what would be the lines i should use and what line it should replace? Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463386 Share on other sites More sharing options...
andy12 Posted December 31, 2013 Author Share Posted December 31, 2013 Thank you, looks like it is taking the numbers this time... Quote Link to comment https://forums.phpfreaks.com/topic/284993-newbie-need-help/#findComment-1463388 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.