in Education by
newbie here, so thanks in advance for help! I have a Wordpress site with multiple taxonomies. I'd like to create a very simple form with two select boxes, one for each taxonomy. Then I'd like to use an HTML form with the get method to display posts matching the criteria they requested from the select boxes. I'm able to do this easy enough if each of the two select boxes are filled out, I get a permalink something like: testsite.com/?tax1=value1&tax2=value2 (ugly, I know, but it works). What I can't figure out is what to do if they don't fill out both select boxes. Ideally it would only give the permalink for the one they fill in, so either: testsite.com/?tax1=value1 or testsite.com/?tax2=value2 But instead I'm getting testsite.com/?tax1=value1&tax2=Select+tax here is my HTML Season:
Vacation type:
I realize the answer is probably simple but I'm banging my head against a wall so any help is very very much appreciated. Thank you! JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can still pass an empty parameter like testsite.com/?tax1=&tax2=whatever_was_selected or testsite.com/?tax1=whatever_was_selected&tax2= but, you would have to preselect one of the options for them like Select vacation type This way if the form is submitted and the user didn't change their selection it should still pass the parameter of but without a value.

Related questions

0 votes
    I am exploring Float Label pattern for web page using HTML and CSS. The code was referred from http: ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 27, 2022 in Education by JackTerrance
0 votes
    I use the vendor time picker component. Unfortunately, it uses rem units for most of its sizes, but ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    newbie question: how do i make my JSON output ignore null values? I don't want to necessarily set ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    newbie question: how do i make my JSON output ignore null values? I don't want to necessarily set ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I have the following HTML/ASP.NET code: Ny test Name: When using the "POST" form post method I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    I have Html website. There is newsletter signup form in the html. It is processed by php script file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I have Html website. There is newsletter signup form in the html. It is processed by php script file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have Html website. There is newsletter signup form in the html. It is processed by php script file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    On Internet Explorer, the standard HTML file upload form also allows for direct input of the file name ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    site a web page using appropriate HTML tags to glay the given form. tivity CREATE YOUR OWN FORM First name: ... information. SEND RESET Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    a) Harshita wants to create an HTML form. Which tag should she use to create this form? Her teacher has asked ... plz answer this fast Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    What is the work of the form control elements in the HTML DOM? (a) User Interface elements (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    A __________ is a program running on the server machine, which accepts requests from a Web ... Fundamentals in division Database Programming Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    I have an HTML table with a search field to filter the result by Name. And another field to show ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 22, 2022 in Education by JackTerrance
0 votes
    I am a newbie to Scala and I want to learn how can I add null and empty check on an optional ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
...