MyBB Community Forums

Full Version: Form Value Does NOT Equal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was curious if it was possible to do a value does not equal in HTML forms. Particularly related to the search function!

As of right now I have this, which ends up searching the threads in FID 9.
<input type="hidden" name="forums[]" value="9" />

What I actually want it to do is NOT pull up any threads in FID 9 but I'm unsure if a condition like that can be done in forms.

Any suggestions would be helpful. Thank you!

=====================
OR ALTERNATIVELY
===========

An input for last post dateline being a month ago, I've tried with no success:
<input type="hidden" name="lastpostdate[]" value="30" />
If I am getting you correctly, then what you wanna achieve can not be done in front end with only HTML form codes, I am afraid. If it is at all to do at front end you can place some javascript validation but, again, that is not a bulletproof solution as js disabled browsers can still be able to post the form.

The best way to do this is placing some server side validation after posting the form, or may be, combined with front-end js validation.
Thanks for the reply! I ended up just using time frames (as anything older than 30 days is put into the forum I do not want to show). So by doing so it got rid of that. Smile