In my Laravel 8 Multi step form not submitting - laravel

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.

Related

Password reset using spring through mail

I have implemented, mailing feature through which a confirmation token is send to the user and on clicking the url provided, a page opens that fills the email id of the user to which the email is sent.
Then they can reset, however when i am trying to submit the form with the new password. It is not passing the value to the function i have provided.
#PostMapping("/resetUserPassword")
public String accountPasswordReset(#Valid #ModelAttribute("updateUserPassword") ResetPassword user, BindingResult theBindingResult, Model theModel){
//this line outputs null value
System.out.println("accountPasswordReset: email="+user.getEmail());
if(user.getEmail()!=null) {
User tokenUser = userService.findByEmailIdIgnoreCase(user.getEmail());
tokenUser.setPassword(passwordEncoder.encode(user.getPassword()));
userService.save(tokenUser);
return "successPasswordReset";
}else {
return "error";
}
}
<form:form action="${pageContext.request.contextPath}/register/resetUserPassword" modelAttribute="updateUserPassword" class="form-horizontal" method="POST">
<!-- Email -->
<div class="form-group">
<label for="emailId">Email (*)</label>
<form:input path="email" id="emailId" placeholder="email (*)"
class="form-control" disabled="true" readonly="true" />
<form:errors path="email" cssClass="error" />
</div>
<!-- Password -->
<div class="form-group">
<label for="password">Password (*)</label>
<form:password path="password" id="password"
placeholder="password (*)" class="form-control" />
<form:errors path="password" cssClass="error" />
</div>
<!-- Reset Button -->
<div style="margin-top: 10px" class="form-group">
<div class="col-sm-6 controls">
<button type="submit" class="btn btn-primary">Reset</button>
</div>
</div>
</form:form>
I was missing smallest thing, in this line i just removed disabled="true" and it works
<form:input path="email" id="emailId" placeholder="email (*)" class="form-control" disabled="true" readonly="true" />
to
<form:input path="email" id="emailId" placeholder="email (*)" class="form-control" readonly="true" />

C# Launching Yodlee FastLink

I'm doing a project to launch yodlee fastlink. I was able to get the token and userSession and trying the below codes. I'm only getting "Cannot POST resource". I'm trying to find a more detailed/simpler documentation. Any help would be appreciated.
<form action="https://node.developer.yodlee.com/authenticate/restserver" method="post" name="rsessionPost" id="rsessionPost" target="yodleeIframe">
<input style="visibility: hidden" type="text" name="rsession" placeholder="rsession" value="08312016_0:149676f79ace306255a2c7827f9db590ccabd7350ad5d952f31fc503675bba9ec522728c213a9e5c3e98bd8ceff795c88f9a6f80040a68ce325ae54759f6e504" id="rsession" /><br />
<input style="visibility: hidden" type="text" name="app" placeholder="FinappId" value="10003600" id="finappId" /><br />
<input style="visibility: hidden" type="text" name="redirectReq" placeholder="true/false" value="true" /><br />
<input style="visibility: hidden" type="text" name="token" placeholder="token" value="e59f51a169f52925cd715a945630686e59667d2d1fae511fd50b4e292a8e7342" id="token" /><br />
<input type="submit" name="submit" />
</form>
It seems like there is a forward slash '/' missing at the end of the URL.
Please put it there and submit the form you should be able to access Fastlink.
"https://node.developer.yodlee.com/authenticate/restserver/"

How to make Code Igniter Controller for multiple input form with type="file"

i want to ask, how to make the controller function in CodeIgniter for this view ?
<form action="<?=base_url()?>posts/new_post" method="post" enctype="multipart/form-data"><br>
<input type="file" name="before" id="before" ><br>
<input type="file" name="after" id="after" ><br>
<input type="text" class="form-control" id="title" name="title" placeholder="Enter name"><br>
<textarea class="form-control" id="description" name="description" placeholder="Enter name"></textarea><br>
<input type="submit" value="Submit Profile Picture" name="submit" class="btn btn-primary ">
</form>
Thank You

use the hidden form value in virtuemart joomla

i want to use the hidden form value "virtuemart_product_price" a administrator\components\com_virtuemart\helpers\calculationh.php
this form is added in components\com_virtuemart\views\cart\tmpl\default.php ..
<form method="post" class="product js-recalculate" action="/ecomm/index.php/component/virtuemart/">
<div class="addtocart-bar">
<!-- <label for="quantity229" class="quantity_box">Quantity: </label> -->
<span class="quantity-box">
<input type="hidden" class="quantity-input js-recalculate" name="quantity[]" value="1"/>
</span>
<span class="addtocart-button">
<input type="submit" name="addtocart" class="addtocart-button" value="Pick free" title="Pick free" /> </span>
<div class="clear"></div>
</div>
<input type="hidden" name="virtuemart_product_price" value="5" />
<input type="hidden" class="pname" value="Custom Item"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="cart"/>
<noscript><input type="hidden" name="task" value="add"/></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo virtuemart_product_id;?>"/>
</form>
i tried to get but i can't find a solution.

How to implement paypal in Codeigniter

I have developed an site using Codeigniter and I want to put paypal for one of my application.For that I have followed many forms like THIS but while I followed all the steps,it giving me blank screens...Can anyone tell me or even suggest me for the better tutorial for Paypal..Thanks in advance..
use following paypal form pattern for paypal payment
//$urlpaypal = "https://www.paypal.com/cgi-bin/webscr";
//$urlpaypal = "https://www.sandbox.paypal.com/cgi-bin/webscr";//sandbox
<form method="post" name="frmPayPal" id="frmPayPal" action="<?=$urlpaypal ?>">
<input type="hidden" name="item_number" value="<?=$id?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="business" value="<?=$businessId?>">
<input type="hidden" name="redirect_cmd" value="_cart">
<input type="hidden" name="handling_cart" value="<?=$shipprice?>">
<input type="hidden" name="cmd" value="_ext-enter" />
<input type='hidden' name='upload' value='1'>
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="lc" value="<?php echo $lccode;?>">
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
<input type="hidden" name="image_url" value="<?=base_url()?>img/logo.jpg">
<input type="hidden" name="return" value="<?=base_url()?>index.php/payment/receipt/<?php echo $id;?>">
<input type="hidden" name="notify_url" value="<?=base_url()?>index.php/payment/notify">
<input type="hidden" name="cancel_return" value="<?=base_url()?>index.php/payment/cancle">
<input type="hidden" name="invoice" value="<?=base64_encode($invoiceId)?>">
<input type="hidden" name="currency_code" value="<?php echo $currencycode;?>">
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="cs" value="0" />
<input type="hidden" name="custom" value="<?=$customFieldValue?>">
<input type="hidden" name="discount_amount_cart" value="<?=$discount_amount?>">
<input type="hidden" name="cc_number" value="123">
<input type="hidden" name="cpp_ headerback_ color" value="78f3f5">
<input type="hidden" name="cpp_ headerborder_color" value="78f3f5">
<input type="hidden" name="cpp_payflow_ color" value="78f3f5">
</form>
and js code for auto form submission in one second
<script type="text/javascript" language="javascript">
setTimeout("document.forms['frmPayPal'].submit()", 1000);
</script>

Resources