Warning</b>: Trying to access array offset on value of type bool in line 44..how do i solve this error? - echo

" type="text" placeholder="Enter Pupils Full Name" required="" name="pupils_full_name" class="form-control " />

Related

How do I get checkbox value in email after submit from https://formsubmit.co?

Hi I use https://formsubmit.co as form submit.
Formsubmit only returns one checkbox even if two or more checkboxes is checked.
<form action="https://formsubmit.co/info#enchuga.com" method="POST">
<input type="hidden" name="_subject" value="Snyggt!! Ny beställning av algos">
<input type="hidden" name="_next" value="https://enchuga.com/enchugacap/thanks.html">
Name: <br>
<input class="contactForm" type="text" name="Name" placeholder="Your name" required> <br>
<br>
Mail: <br>
<input class="contactForm" type="email" name="Email" placeholder="Email Address" required> <br>
<br>
Which trading algorithms do you want to order? <br>
<input type="checkbox" id="LosAngeles" name="Algo" value="LosAngeles">
<label for="LosAngeles" class="orderText"> Los Angeles 69€/year (699 SEK)</label><br>
<input type="checkbox" id="London" name="Algo" value="London">
<label for="London" class="orderText"> London 69€/year (699 SEK)</label><br>
<input type="checkbox" id="Paris" name="Algo" value="Paris">
<label for="Paris" class="orderText"> Paris 69€/year (699 SEK)</label><br>
<input type="checkbox" id="Berlin" name="Algo" value="Berlin">
<label for="Berlin" class="orderText"> Berlin 69€/year (699 SEK)</label><br>
<input type="checkbox" id="NewYork" name="Algo" value="NewYork">
<label for="NewYork" class="orderText"> New York 69€/year (699 SEK)</label><br>
<input type="checkbox" id="allAlgos" name="Algo" value="allAlgos">
<label for="allAlgos" class="orderText"> All five algos 260€/year (2600 SEK, 25% discount)</label><br>
<br>
Send a message to enchuga CAPITAL if you wondering about anything or want to ask a question: <br>
<input class="contactForm2" type="text" name="Message"> <br>
<br>
<button type="submit">Send</button>
</form>
How do I get it to return every checkbox checked?
I have tried to create checkboxes that returns the item they checked but I don't get it to work.

Shopify Omnisend Custom HTML Signup Form

I am using omnisend app for Shopify subscribe list. I am using a custom form to integrate the input data.
For the ominsend form, they have own class to capture data.
Like this:
<form class="my-form omnisend-subscribe-form" action="/subscribe" method="post">
<input class="omnisend-subscribe-input-email" type="text" placeholder="Enter your email address" />
<input class="omnisend-subscribe-input-first-name" type="text" placeholder="Enter your first name" />
<input class="omnisend-subscribe-input-last-name" type="text" placeholder="Enter your last name" />
<input type="submit" value="Subscribe!">
</form>
First Name: omnisend-subscribe-input-first-name
Last Name: omnisend-subscribe-input-last-name
Email: omnisend-subscribe-input-email
But for the birthday input data, I am unable to find the class.
How can I dynamic the birthday input data by class?
<form class="my-form omnisend-subscribe-form" action="/subscribe" method="post">
<input class="omnisend-subscribe-input-email" type="text" placeholder="Enter your email address" />
<input class="omnisend-subscribe-input-first-name" type="text" placeholder="Enter your first name" />
<input class="omnisend-subscribe-input-last-name" type="text" placeholder="Enter your last name" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="MM" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="DD" />
<input class="omnisend-subscribe-input-?" type="text" placeholder="YYYY" />
<input type="submit" value="Subscribe!">
</form>
Actually, there is no way to collect the birthday form the omnisend form. This form is not support to collect birthday.

"An undefined behavior was detected: undefined is not an instance of java.lang.String"

I am using scalajs/angulate
I have a problem that only occurs when using type="email" on a form. When i change it to type="text" the problem disappears.
The problem manifests itself:
The email field does not change when typing
Exception "An undefined behavior was detected: undefined is not an instance of java.lang.String"
This is my controller
class FooInfoController(…) extends Controller {
var name: String = _
var email: String = _
…
}
And the html
<div class="wrapper" ng-controller="FooInfoController as ctrl">
<form ng-submit="ctrl.add()">
<div class="form-group">
<label for="email">Email</label>
<input class="form-control" id="email" required maxlength="80" name="email" size="20" type="email"
ng-model="ctrl.email"
placeholder="email address">
</div>
</form>
</div>

Can't receive all contents of mail

(This are just some of my code for the HTML to cut it short), i don't get it why i can't get the value inputted by the user for the email while i can get values of others like NAME, PHONE, COMPANY etc. can you help me what's wrong? i'm a beginner so please try to be nice. THANK YOU
HTML:
<form action="contact_sendmail.php" method="post">
<label for="first name"> First Name *</label><br>
<input class="textbox" type=text autofocus id="Fname" name="Fname" maxlength="50"size="30" value="" required>
<br>
<label for="last name"> Last Name *</label><br>
<input class="textbox" type=text id="Lname" name="Lname" maxlength="50"size="30" value="" required>
<br>
<label for="email">Email * </label> <br>
<input class="textbox" type="text" id="email" maxlength="50"size="30" value="" required>
<input class="button" name="submit" type="submit" value="Submit">
MAIL FUNCTION:
<?php
if(isset($_POST['submit'])){
$msg = 'Name: '.$_POST['Lname'] .$_POST['Fname'] ." \n"
.'Email: '.$_POST['email'] ."\n"
.'Phone Number: '.$_POST['phone'] ."\n"
.'Company: '.$_POST['company'] ."\n"
.'Number of Employees: '.$_POST['employee_num'] ."\n"
.'Comment: '.$_POST['comment'] ;
mail('example#gmail.com', 'sample contact us Form', $msg);
?>
"<script>" alert('successfully sent'); "</script>"
<?php
}else {
header('location:contact.php');
exit(0);}
?>

On CodeIgniter, how to repopulate a form only with correct values?

Imagine a form like this:
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?=set_value('firstname')?>" />
<input type="text" name="lastname" value="<?=set_value('lastname')?>" />
<input type="text" name="email" value="<?=set_value('email')?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
If I submit an incorrect email, the CodeIgniter function will write "the field is not valid" and populate the invalid field with the wrong value.
I would like to keep the error message but not the wrong value (I prefer having an empty value). But I also want to keep the re-populating function for correct values.
Here is what I get:
Here is what I want:
[EDIT] SOLUTION FOUND (thanks to Herr Kaleun and Matt Moore)
Example with the email field:
<input type="text" name="email" id="email" value="<?=!form_error('email')?set_value('email'):''?>" />
You can check the fields individually and have a logic like this.
If the error for a specific field is present, you can build a logic on top of that.
if ( form_error('email') != '' )
{
$data['email_value'] = '';
}
else
{
$data['email_value'] = set_value('email');
}
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?=set_value('firstname')?>" />
<input type="text" name="lastname" value="<?=set_value('lastname')?>" />
<input type="text" name="email" value="<?= $email_value; ?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
The Form_error is set when a form value errors out based on the validation. Judging by your use of the set_value function I assume you're using the built in form validation. You can check to see if the message for that field is set if(form_error('fieldname') !=NULL) and set the value based on that.
You may have to setup error messages for each field, which you should be doing anyway. Here is the guide that covers it: http://codeigniter.com/user_guide/libraries/form_validation.html#repopulatingform
<form action="test.php" method="post">
<input type="text" name="firstname" value="<?if(form_error('firstname') != NULL){echo set_value('firstname');}?>" />
<input type="text" name="lastname" value="<?if(form_error('lastname') != NULL){ echo set_value('lastname');}?>" />
<input type="text" name="email" value="<?if(form_error('email') !=NULL){ echo set_value('email');}?>" />
<input type="submit" name="submit_form" value="OK" />
</form>
*NOTE THIS CODE HAS NOT BEEN TESTED *