Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing html link as form button
    primarykey
    data
    text
    <p>I have a login form where a user (that is not logged yet) can insert his login and password, after filling these fields the user has to press a submit button.</p> <p>What i'm trying to do is: Replace the normal submit button for a $html->link with some css styles.</p> <p>So is there anyway I can use something like this:</p> <pre><code>&lt;span class = "licitateThis clearfix"&gt; &lt;?php echo $html-&gt;link(__("Sign In", true), array("type" =&gt; "Sign In", 'class'=&gt;'licitate')); ?&gt; &lt;/span&gt; </code></pre> <p>Instead of:</p> <pre><code> echo $form-&gt;end(__('Sign In',true)); </code></pre> <p>to create a submit button for a small login form?</p> <p>My css code:</p> <pre><code>.licitateThis{position:relative;float:left;width:100%;} .licitateThis a.licitate{display:block;float:left;padding:2px 0 4px;width:100%;background-color:#eee;text-shadow:#fff 1px 1px 1px;text-decoration:none;font-weight:bold;font-size:115%;border:1px solid #fff;border-radius:3px;text-align:center;letter-spacing:-0.02em;text-transform:uppercase;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;} .licitateThis a.licitate:hover,.licitateThis:hover a{background-color:#0071bb;text-shadow:#666 1px 1px 1px;color:#fff;} </code></pre> <p>PS: The form im trying to submit its a login form, and its located at default.ctp so it can be used in every pages.</p> <p><strong>Problem solved:</strong></p> <p>CSS (created a new class):</p> <pre><code>.loginSubmit {color:#0071bb;outline:none; display:block;float:left;padding:2px 0 4px;width:100%;background-color:#eee;text-shadow:#fff 1px 1px 1px;text-decoration:none;font-weight:bold;font-size:115%;border:1px solid #fff;border-radius:3px;text-align:center;letter-spacing:-0.02em;text-transform:uppercase;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;} .loginSubmit:hover {background-color:#0071bb;text-shadow:#666 1px 1px 1px;color:#fff;} </code></pre> <p>PHP:</p> <pre><code> &lt;button type="submit" class="loginSubmit"&gt;Sign In&lt;/button&gt; &lt;?php echo $form-&gt;end(); ?&gt; </code></pre> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload