What if you would like to add the ability for your site's users to choose the translation of the Bible they would like to search? Here is an example of what that will look like. You can even select the default translation.
Here is the code from the previous version with the select box inserted.
<form action="https://www.blueletterbible.org/search/preSearch.cfm" method="get" target="_new">
<input type="text" name="Criteria" />
<select name="t">
<option value="KJV">KJV</option>
<option value="NKJV" selected>NKJV</option>
<option value="NLT">NLT</option>
<option value="NIV">NIV</option>
<option value="ESV">ESV</option>
<option value="CSB">CSB</option>
<option value="NASB20">NASB20</option>
<option value="NASB95">NASB95</option>
<option value="LSB">LSB</option>
<option value="AMP">AMP</option>
<option value="NET">NET</option>
<option value="RSV">RSV</option>
<option value="ASV">ASV</option>
<option value="YLT">YLT</option>
<option value="DBY">DBY</option>
<option value="WEB">WEB</option>
<option value="HNV">HNV</option>
<option value="VUL">VUL</option>
<option value="WLC">WLC</option>
<option value="LXX">LXX</option>
<option value="mGNT">mGNT</option>
<option value="TR">TR</option>
<option value="SVD">SVD</option>
<option value="NAV">NAV</option>
<option value="BES">BES</option>
<option value="RVR09">RVR09</option>
<option value="RVR60">RVR60</option>
<option value="BBE">BBE</option>
<option value="CHT">CHT</option>
<option value="EM">EM</option>
<option value="KOR">KOR</option>
<option value="LS">LS</option>
<option value="LUT">LUT</option>
<option value="RST">RST</option>
<option value="SE">SE</option>
</select>
<input type="submit" value="Search" />
</form>
Now this is only slightly more complex than what we did before. Here we are making use of the <select> tag. We put an opening one at the beginning of our drop down code and a closing one at the end of our drop down code. All of our selectable options will fall between these two tags. Like this:
<form action="https://www.blueletterbible.org/search/preSearch.cfm" method="get" target="_new">
<input type="text" name="Criteria" />
<select name="t">
<OPTION #1>
<OPTION #2>
<ETC.>
</select>
<input type="submit" value="Search" />
</form>
And just like we did with our text input, we have to give our <select> tag a name so that our program will know how to process the choices your users' select—in this case, we use name="t".
Next we will look at how to populate the drop down with a list of choices. We will use the <option> tag for this. The basic format here will be to use <option> and give it a value attribute using the translation's abbreviation (for example, value="KJV"). This tag will be immediately followed by whatever text you would like to use to identify the choice in the eyes of your user (the value we previously added was only for the program to see. In our case here, we have stuck to abbreviations for the drop down as well. Then we add a closing </option> and we are finished with that option line and ready to move on to the next.
Here is a select box with four examples, so you can see how it works. Note: You can limit the available translations in your site's drop down.
<form action="https://www.blueletterbible.org/search/preSearch.cfm" ;method="get" target="_new">
<input type="text" name="Criteria" />
<select name="t">
<option value="KJV">King James</option>
<option value="NKJV">New King James</option>
<option value="NLT">New Living</option>
<option value="NIV">New International</option>
</select>
<input type="submit" value="Search" />
</form>
This is how that code will render in a browser:
You can set the default translation by adding the selected attribute to the appropriate <option> tag. In the below example, we will use this to set the NLT our default.
<form action="https://www.blueletterbible.org/search/preSearch.cfm" method="get" target="_new">
<input type="text" name="Criteria" />
<select name="t">
<option value="KJV">KJV</option>
<option value="NKJV">NKJV</option>
<option value="NLT" selected="selected">NLT</option>
<option value="NIV">NIV</option>
</select>
<input type="submit" value="Search" />
</form>
Step 3 - Range
Another feature is being able to support a search range. If you would like to find related terms in the New Testament, you can do this with our range options. Clicking Search with the settings used below will perform this task.
In order to add the ranging option, we will need to add another line or two to our search tool's size as well as a fair amount of code. Take a look:
<form action="https://www.blueletterbible.org/search/preSearch.cfm" method="get" target="_new">
<p>
<input type="text" name="Criteria" />
<select name="t">
<option value="KJV">KJV</option>
<option value="NKJV" selected>NKJV</option>
<option value="NLT">NLT</option>
<option value="NIV">NIV</option>
<option value="ESV">ESV</option>
<option value="CSB">CSB</option>
<option value="NASB20">NASB20</option>
<option value="NASB95">NASB95</option>
<option value="LSB">LSB</option>
<option value="AMP">AMP</option>
<option value="NET">NET</option>
<option value="RSV">RSV</option>
<option value="ASV">ASV</option>
<option value="YLT">YLT</option>
<option value="DBY">DBY</option>
<option value="WEB">WEB</option>
<option value="HNV">HNV</option>
<option value="VUL">VUL</option>
<option value="WLC">WLC</option>
<option value="LXX">LXX</option>
<option value="mGNT">mGNT</option>
<option value="TR">TR</option>
<option value="SVD">SVD</option>
<option value="NAV">NAV</option>
<option value="BES">BES</option>
<option value="RVR09">RVR09</option>
<option value="RVR60">RVR60</option>
<option value="BBE">BBE</option>
<option value="CHT">CHT</option>
<option value="EM">EM</option>
<option value="KOR">KOR</option>
<option value="LS">LS</option>
<option value="LUT">LUT</option>
<option value="RST">RST</option>
<option value="SE">SE</option>
</select>
<input type="submit" value="Search" />
</p>
<p>
<strong>Range Options:</strong><br />
<input type="text"
name="cscs" />
e.g. Gen;Psa-Mal;Rom 3-9
</p>
</form>
Range options are set in a new <p> tag in bold followed by a line break. Next is the <input> tag. The two attributes and the values for the next step are: type="text" (tells the <input> tag to display as a text box) and name="cscs" (sends the information to Blue Letter Bible program in a way that the program can use).
The text on the next line has some examples for your users to help them understand how to use the Range option search feature.
This code will display like this:
This is what you would need to do, if you want to drop the Range Option identifier and the example text and fit everything on one line:
<form action="https://www.blueletterbible.org/search/preSearch.cfm"
onSubmit="if(this.cscs.value=='Optional Verse Range')
this.cscs.value='';"
method="get" target="_new">
<p>
<input type="text" name="Criteria" />
<select name="t">
<option value="KJV">KJV</option>
<option value="NKJV" selected>NKJV</option>
<option value="NLT">NLT</option>
<option value="NIV">NIV</option>
<option value="ESV">ESV</option>
<option value="CSB">CSB</option>
<option value="NASB20">NASB20</option>
<option value="NASB95">NASB95</option>
<option value="LSB">LSB</option>
<option value="AMP">AMP</option>
<option value="NET">NET</option>
<option value="RSV">RSV</option>
<option value="ASV">ASV</option>
<option value="YLT">YLT</option>
<option value="DBY">DBY</option>
<option value="WEB">WEB</option>
<option value="HNV">HNV</option>
<option value="VUL">VUL</option>
<option value="WLC">WLC</option>
<option value="LXX">LXX</option>
<option value="mGNT">mGNT</option>
<option value="TR">TR</option>
<option value="SVD">SVD</option>
<option value="NAV">NAV</option>
<option value="BES">BES</option>
<option value="RVR09">RVR09</option>
<option value="RVR60">RVR60</option>
<option value="BBE">BBE</option>
<option value="CHT">CHT</option>
<option value="EM">EM</option>
<option value="KOR">KOR</option>
<option value="LS">LS</option>
<option value="LUT">LUT</option>
<option value="RST">RST</option>
<option value="SE">SE</option>
</select>
<input type="text" name="cscs"
title="Use semicolons to separate groups -
Gen;Jdg;Psa-Mal;Rom 3-12;Mat 1:15;Mat 5:12-22"
value=""
placeholder="Optional Verse Range" />
<input type="submit" value="Search" />
</p>
</form>
As you can see, we have moved the range <input> up before the Search button. This will place it between the Bible version drop down and the Search button when we view the page in a browser.
There are three attributes we will discuss. The first attribute we will look at is title. This is similar to the example text we used previously, though more detailed. With the title text in place, users will see this text when they mouse over the range input box.
The other two attributes, value & placeholder work together. These make it so the Range Option input says "Optional Verse Range" though it is only there as a hint of what the user should type in.
This code then will create a search feature that looks something like this:
We hope that this will be a tool that is helpful to your users as they study God's Word.