salesforce web to lead with "notes" - salesforce

I'm trying to use Web to Lead functionality of salesforce. I can create a lead, but the Notes field does not get the data I supplied in the form. Here's the form I'm sending:
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="xxxxxxx">
<input type=hidden name="retURL" value="http://www.mycompany.com">
<label for="first_name">First Name</label><input id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>
<label for="last_name">Last Name</label><input id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>
<label for="email">Email</label><input id="email" maxlength="80" name="email" size="20" type="text" /><br>
<label for="company">Company</label><input id="company" maxlength="40" name="company" size="20" type="text" /><br>
Notes:<textarea id="00N6100000C5D5Z" name="00N6100000C5D5Z" type="text" wrap="soft"></textarea><br>
<label for="street">Street</label><textarea name="street"></textarea><br>
<input type="submit" name="submit">
</form>
Every field gets populated in the new lead entry, except Notes. Has anyone ran into this issue? How did you resolve it?
Thanks in advance!

I haven't got why you have specified type="text" with your textarea. Textarea itself is a type.
Can you replace
Notes:<textarea id="00N6100000C5D5Z" name="00N6100000C5D5Z" type="text" wrap="soft"></textarea><br>
With:
Notes:<textarea id="00N6100000C5D5Z" name="00N6100000C5D5Z" wrap="soft"></textarea><br>
Give it a try.

Related

AngularJS redirect user to payment gateway after submitting form

I'm working on a angularjs project.
I'm in the process of integrating payment gateways. I'm stuck with the gateway submission.
Basically without angularjs, when a user clicks "Pay Now", the form submits the data to the gateway along with some hidden fields and takes the user directly to the payment gateway.
Whereas in angularjs, when the user clicks "Pay now", nothing happens.
I have the form in angularjs html file as follows.
<form action="payumbtn.action" method="post" name="payuForm" id="payuForm" style="display: block">
<input type="hidden" name="key" ng-model="payumbtn.merchant_key" />
<input type="hidden" name="hash" ng-model="payumbtn.hash"/>
<input type="hidden" name="txnid" ng-model="payumbtn.txnid" />
<input name="amount" type="hidden" ng-model="payumbtn.totalCost" />
<input type="hidden" name="firstname" id="firstname" ng-model="payumbtn.firstName" />
<input type="hidden" name="email" id="email" ng-model="payumbtn.email" />
<input type="hidden" name="phone" ng-model="payumbtn.mobile" />
<textarea name="productinfo" ng-hide="true">{{payumbtn.productinfo}}</textarea>
<input type="hidden" name="surl" ng-model="payumbtn.success_url" />
<input type="hidden" name="furl" ng-model="payumbtn.failure_url"/>
<input type="hidden" name="service_provider" value="payu_paisa"/>
<input type="hidden" name="lastname" id="lastname" ng-model="payumbtn.lastName" />
<input type="hidden" name="udf1" id="udf1" ng-model="payumbtn.udf1" />
<input type="hidden" name="udf2" id="udf2" ng-model="payumbtn.udf2" />
<input type="submit" value="Pay now"/>
</form>
Now the {{payumbtn.xxxx}} data is fetched from a previous post so don't bother it.
What I need
I need the form to submit the payment data to the gateway and redirect the user to the gateway.

How can i create dynamicly in ng-model using variable

<input ng-model="company.title_{{selectedLang}}"
type="text" placeholder="" class="form-control">
I have already try:
<input ng-model="company.title_[selectedLang]"
type="text" placeholder="" class="form-control">
It doesn't work.
Can anyone help me?
<!-- REPLACE this
<input ng-model="company.title_{{selectedLang}}"
type="text" placeholder="" class="form-control">
-->
<!-- WITH this -->
<input ng-model="company['title_'+selectedLang]"
type="text" placeholder="" class="form-control">

Required fieldset html [Angular]

There is a way to required form fieldset and don't every input?
My point: the user can choose what to fill but will not have to fill all of the fieldset inputs
I have this two:
1:
<fieldset>
<legend> legend </legend>
<label for="id"> label </label>
<input type="text" id="id" name="name">
<label for="id2"> label </label>
<input type="text" id="id2" name="name2">
</fieldset>
2:
<fieldset>
<legend> legend </legend>
<label for="id"> label </label>
<input type="radio" id="id" name="name">
<label for="id2"> label </label>
<input type="radio" id="id2" name="name">
</fieldset>
I use Angular if it can be simplest.
If you only have 2 options, the easiest thing to do would be:
<fieldset>
<legend> legend </legend>
<label for="id"> label </label>
<input type="text" id="id" name="name" ng-required="!name2">
<label for="id2"> label </label>
<input type="text" id="id2" name="name2" ng-required="!name">
</fieldset>
Edit: Since they are dynamic, you would probably need a model to help you out on each fieldset.
<fieldset>
<legend> legend </legend>
<label for="id"> label </label>
<input type="text" id="id" name="name" ng-model="fieldSetHasValue" ng-change="fieldSetHasValue = true">
<label for="id2"> label </label>
<input type="text" id="id2" name="name2" ng-model="fieldSetHasValue" ng-change="fieldSetHasValue = true">
</fieldset>
And then before you submit, check if fieldSetHasValue is true. This is just one of many ways to accomplish this and there will no doubt be some kinks to work through if you implement this. This is just a quick off the top of my head solution without seeing the rest of your code.

Salesforce Web to Lead Form text area field not submitting

I have a salesforce web to lead form. Everything seems to be going through to salesforce except the comments textarea box. Any idea why just this field wouldn't work?
The code for the texarea field (there is an actual number in id and name)
  <form class="sf-form" id="contact-1"
action="https://www.salesforce.com/servlet/servlet.WebToLead?
encoding=UTF-8" method="POST">
<div class="sf-left">
<label class="sf-label">First Name</label><input class="sf-text"
id="first_name" type="text" maxlength="40" name="first_name"
size="20" />
<label class="sf-label" for="last_name">Last Name</label><input
class="sf-text" id="last_name" type="text" maxlength="80"
name="last_name" size="20" />
<label class="sf-label" for="email">Email</label><input class="sf-
text" id="email" type="text" maxlength="80" name="email" size="20"
/>
<label class="sf-label" for="phone">Phone</label><input
class="sf-text" id="phone" type="text" maxlength="40" name="phone"
size="20" />
<label class="sf-label" for="company">Company</label>
<input class="sf-text" id="company" type="text" maxlength="40"
name="company" size="20" />
</div>
<div class="sf-right">
Comments:<textarea name="000number here" id="same 000number here"
class="sf-textarea" rows="10" type="text" wrap="soft" ></textarea>
<br>
<input type="submit" name="submit" class="sf-submit">
</div>
<div class="clearfix"></div>
</form></div>
In debug mode I am getting the following for the textarea field
xxxxxxxx(some long number here): This is another test to get the debug code(long number here): Whatever I put in comments
I'm not sure if those long numbers have to do with their account, I'm not familiar with salesforce... are they debug codes?
Thanks!
Ahh. Well the client was showing the form to Salesforce (they wouldn't give me access) and I guess it is working now. That must've been the issue, because I haven't changed anything on my end. Thanks for your time! – Beth 2 mins ago

How to use put method to update a database from a form

I'm trying to update a database from a form without using any php, I'm using angularjs with MySql
If I use the following with the put method I can insert a user into the data base, I've
http://localhost:8080/CyberSolution/rest/user/register?u=tester&pw=fred&fname=Fred&lname=Smith&email=fred#localhost.com
I've made a basic html form
<form method="POST" action="">
Username: <input type="text" name="username" size="15" /><br />
Password: <input type="password" name="password" size="15" /><br />
email: <input type="text" name="email" size="15" /><br />
First name: <input type="text" name="first_name" size="15" /><br />
Last name: <input type="text" name="lirst_name" size="15" /><br />
<p><input type='submit' name='Submit' value='Submit' /></p>
</form>
I'm working with AJS for the first time and also REST for the first time, I'm unsure on how to link the form to the database to update. I'm unsure what needs to go in the controllers.js as well
Thanks
You could simply use the $http service.
First use ng-model to store fields value in an object :
<form ng-submit="send_form()" action="">
Username: <input type="text" name="username" size="15" ng-model="form.username" /><br />
Password: <input type="password" name="password" size="15" ng-model="form.password"/><br />
email: <input type="text" name="email" size="15" ng-model="form.email"/><br />
First name: <input type="text" name="first_name" size="15" ng-model="form.first_name"/><br />
Last name: <input type="text" name="lirst_name" size="15" ng-model="form.last_name"/><br />
<p><input type='submit' name='Submit' value='Submit' /></p>
</form>
And then use in your controller (or even better, through a service) :
function myController($scope, $http) {
$scope.send_form = function () {
$http.put('http://localhost:8080/CyberSolution/rest/user/register', $scope.form).success(successCallback);
}
}

Resources