Forum

Thread tagged as: Question, Forms, Field-Types

Simple search HTML

Hello,

how do I convert the below into my current html please?

<!-- perch standard html--> 

<perch:form id="search" method="get" action="/search.php">
    <div>
        <perch:label for="q">Search</perch:label>
        <perch:input type="search" id="q" />
        <perch:input type="submit" value="Search" />
    </div>
</perch:form>
<!--my output-->

<form class="form-wrapper cf">

    <input type="text" placeholder="Search here..." required>

    <button type="submit">Search</button>

</form>

Many Thanks

Gary Thompson

Gary Thompson 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

<perch:form id="search" method="get" action="/search.php" class="form-wrapper cf">
    <perch:input type="text" id="q" required="true" />
    <perch:input type="submit" value="Search" />
</perch:form>

Thanks for that,

however I am still having difficulty,

my current code for example is: <button type="submit">Search</button>

Would I need to change it to?

<button type="submit"><perch:input type="submit" value="Search" /></button>

In order for me current CSS to pick this up?

Or, what would be an alternative for me?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, change this:

<perch:input type="submit" value="Search" />

to:

<button type="submit">Search</button>
<perch:input type="cms" />

ok nice!,

what would I need to do with:

<input type="text" placeholder="Search here..." required>

would it be:

<input type="text" placeholder="Search here..." required> <perch:input type="cms" />

Also would the code below remain the same?

<perch:form id="search" method="get" action="/search.php" class="form-wrapper cf">

help appreciated

Drew McLellan

Drew McLellan 2638 points
Perch Support

You shouldn't need to change the rest. What problem are you having?

Hello,

Yes your right, all is good!

Thank you