Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
jamesbream sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9056 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@JamesBream :+1:
Also, there is no arguments object either.
``` (shift+enter for line break)

<!DOCTYPE html>


<meta charset="utf-8">
<title>Form Exercise</title>


<form id="formid" method="get" action="/">
<label for="firstName">First Name:</label>
<input type="text" placeholder="John" required id="firstName">

<label for="lastName">Last Name:</label>
<input type="text" placeholder="Smith" required id="lastName">


<label for="MALE">Male:</label>
<input type="radio" name="gender" value="male">

<label for="FEMALE">Female</label>
<input type="radio" name="gender" value="female">

<label for="other">Other</label>
<input type="radio" name="gender" value="other">


<form id="formid">

<label for="email">Email:</label>
<input id="formid" type="email" required>
<input id="formid" type="password" required>

<select class="" id="month" >
<option value="">Month</option>
<option value="">January</option>
<option value="">Febuary</option>
<option value="">March</option>
<option value="">April</option>
<option value="">May</option>
<option value="">June</option>
<option value="">July</option>
<option value="">August</option>
<option value="">September</option>
<option value="">October</option>
<option value="">November</option>
<option value="">December</option>

<form class="" action="index.html" method="post">
<label for="TOS">I agree to the terms and conditions</label>
<input type="checkbox" name="" value="" id="TOS">

<input type="submit" form="formid" />>




can someone help me
im having an issue with validation
it asks me for validation on the first name and last name but doesnt for the email and password
Stephen James
Please provide links to code rather than big dumps like this.
@sjames1958gm how do i do that?
Stephen James
You can always use git for a repository
THis is at the top of the javascript gitter - not sure why not here. If you are posting code that is large use Gist - https://gist.github.com/ paste the link here.
Bin Gao
@Frosty427 or you can use something like codepen
Stephen James
@Frosty427 Why do you have so many forms? Only the first one seems to have an "action" property
i had lag
@sjames1958gm im trying to recreate the picture in that screenshot
Stephen James
@Frosty427 For the submit button to work, you need all of this in one form, and I can only see required for first/last name
but if i do that it wont look like the picture
Stephen James
How it looks and the form tag shouldn't be related, use CSS to format
im going off of a course with specific instructions and it says to recreate in html
Stephen James
@Frosty427 without any CSS? That seems unreasonable
if you look at the code i made an input button and tied it to an id but its still not going through
Abdus Samad
so far i have this https://codepen.io/abdus123/pen/WMMYQL?editors=1111 how would i make the user make their own user name and password.
Stephen James
@Frosty427 There is only one form with that id
@asamad123 You would probably implement authentication on the backend not the front
@asamad123 back-end. see passportjs authentication
I need some help.. i have an array [{'orderid':4, 'type':'sale'}, {'orderid':5, 'type':'refund'}]... I want to be able to get see if an order exists in the array that matches a type
an order exists?
ah like an order order i thought it was JS terminology
okay so it is an array but each order is an object
sorry if an orderid exists in the array
so you can either do a for loop
which goes through the array i.e. for(var i = 0; i <= yourArray.length;i ++)
and to be able to get the type, you just go
i.type = "something"
since that i pertains to the elements in the array i.e. {orderid:4, type:sale}
function remove_notification(remove_type){
    $('#alerts .alert').each(function(){
        var oid = parseInt($(this).data('order'));
        var type = $(this).data('type');
        if (($.inArray(oid, notifications) == -1) && (type == remove_type)){
            $('.alert[data-order="' + oid +'"][data-type="'+type+'"]' ).remove();
this is what i have so far
or or or you can do a .filter
array.filter(function(obj) {
obj.type = "this type";
array.filter(function(obj) { obj.type = "this type"; });
array.filter(function(obj) {
  obj.type = "this type";
that will spit out an array