bootstrap multiselect box not displayed correctly - bootstrap-multiselect

Im trynig to create a simple multiselect box but for some reason its not visible properly.
Here is my code:-
HTML
<input type="text" id="addRow" />
<input type="button" id="btn" value="Add" />
<form id="form1">
<div style="padding:20px">
<select id="chkveg" multiple="multiple"></select>
<br />
<br />
</div>
</form>
https://jsfiddle.net/04Lgnkqs/

After creating the select you should call the plugin on your select. something like this
$('#chkveg').multiselect();
Refer here

Related

In my Laravel 8 Multi step form not submitting

Form not submit, eventually, it does not show any error, When I click on submit button nothing happens.
Blade file
<form id="msform" method="post" enctype="multipart/form-data" action="{{ route('agent.emp.data.add') }}">
#csrf
<fieldset>
<input type="text" name="empName" placeholder="Enter Your Name" />
<input type="text" placeholder="Date Of Birth" name="empDob" onfocus="(this.type='date')"
onblur="(this.type='text')" id="date" />
<input type="email" name="empEmail" placeholder="Enter Your Email Id" />
<input type="tel" name="empPhone" placeholder="Enter Your Phone Number" />
<input type="button" name="next" value="Next" />
</fieldset>
<fieldset>
<input type="file" name="empPhoto" accept="image/*" onchange="empphoto(this);">
<input type="button" name="previous" value="Previous" />
<input type="submit" name="submit" value="Submit" />
</fieldset>
</form>
Web Route
Route::post('empdataform', [AgentController::class, 'AgentEmpDataAdd'])->middleware('guest')->name('agent.emp.data.add');
Note: I add the AgentController In Route Top
Agent Controller
class AgentController extends Controller
{
public function AgentEmpDataAdd(Request $request){
return $request->all();
}
}
Please Help me in this mater.

Changing Google CSE custom search from http to https

I am using Google Custom Search box with below code
<div class="cse">
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="xxxxxxxxxx" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="30" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script></td></p>
</div>
However as now going to shift all pages to https - has to replace the code
<div class="cse">
<form action="https://cse.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="xxxxxxxxxx" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="30" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="https://cse.google.com/cse.js?cx=' + cx/brand?form=cse-search-box&lang=en"></script></td></p>
</div>
Can anyone help and assist if the above modified code is correct
That seems like it should work, but you should consider switching to the Custom Search Element --- It's the modern, supported way to use Google Custom Search

Web Forms are ignored after clicking on downloadable files

Hello I'm working with a broken web form, the issues is that the current form would only pop up after loading the PDF in a different window tab.
The form is completely ignored after clicking the PDF url, which is redirected into a new tab, without giving any information. I'm working with a drupal site which is version 8.4. I've researched modules and only found web form modules that support Drupal 7 and below. Is there way to fix this current one? I'm still researching on other options.
here's the link to the site https://adnetcmm.com/resources
<div class="overlay" style="display:none">
<div class="contactForm" style="display:none"><b><span class="close">✖</span> </b>
<div>
<p><b>Please submit form to download Pdf</b></p>
</div>
<b> </b>
<form action="#" method="post"><b><input class="inputc" name="name" placeholder="Name" required="" type="text" value="" /> <input class="inputc" name="email" pattern="[a-z0-9._%+-]+#[a-z0-9.-]+\.[a-z]{2,3}$" placeholder="Email" required="" type="text" value="" /> <input class="inputc" name="phone" pattern="[789][0-9]{9}" placeholder="Phone" required="" type="text" value="" /><textarea class="textarea" name="comment" placeholder="Comments.." required=""></textarea> <input class="contbtn" id="ajaxpdf_submit" name="submit" type="submit" value="Submit" /> </b></form>
<b> </b></div>
</div>
</div>

how to call two submit buttons in spring form, one calls j_spring_security_check and another one calling controller method

How to call two submit buttons in spring form,
one button calls j_spring_security_check and another button one calling controller method.
following is login form
<form action="../../j_spring_security_check" method="post" >
<div class="right">
<ul>
<li>
<spring:message code="label.userName" text="UserName" />
<input id="j_username" name="j_username" type="text" />
<form:errors path="firstName" cssclass="error"> </form:errors>
</li>
<li>
<spring:message code="label.password" text="Password" />
<input id="j_password" name="j_password" type="password" />
<form:errors path="password" cssclass="error"></form:errors>
</li>
<li>
<input type="submit" value="Login" />
</li>
</ul>
</div>
</form>
<form action="/portal/main/resetForgetPassword" method="POST">
<input type="submit" value="ForgetPassword">
</form>
thanks advance
I guess your problem is that for every URL it is going to Security form of spring.
So you need to permit for some url so that it should not go to j_spring_security_check
You can do this in the security.xml (whatever may be the name of that file).
<intercept-url pattern="/portal/main/forgetPassword*" access="permitAll" />
<intercept-url pattern="/*" access="hasRole('ROLE_ADMIN_ASSUMED')">
And also in your html code
Forget Password

Why 2 Ajax call are made by a4j

With a simple form when i submit I see 2 request being made for this.
<h:form id="form1">
<a4j:commandButton value="Send" id="cm1" onclick="sendData(193)"/>
<a4j:jsFunction name="sendData">
<a4j:param name="param1" assignTo="#{outageManagementAction.deleteEngineId}" />
</a4j:jsFunction>
</h:form>
The code generated by JSF is following...
<form id="form1" name="form1" method="post" action="/moutagev1/faces/pages/xOutageEdit.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="form1" value="form1" />
<input id="form1:cm1" name="form1:cm1" onclick="jsf.util.chain(this,event,"sendData(193)","RichFaces.ajax(\"form1:cm1\",event,{\"incId\":\"1\"} )");return false;" value="Send" type="submit" /><span id="form1:j_idt257" style="display: none;"><script type="text/javascript">sendData=function(param1){RichFaces.ajax("form1:j_idt257",null,{"parameters":{"param1":param1} ,"incId":"1"} )};</script></span><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="8425501786648002013:2772799535475824519" autocomplete="off" />
</form>
Any Idea why this is happening...
Well, one request is the standard post of the <h:form> the second one is the custom <a4j:jsFunction> which is chained together with the submit when the click happens.
One solution would be to suppress the standard submit by changing the type of the button like this: <a4j:commandButton type="button" />.
Another alternative would be to not use <a4j:jsFunction> at all. Instead use this:
<f:setPropertyActionListener target="#{outageManagementAction.deleteEngineId}" value="193" />

Resources