Current status of the Ning Platform is always available on the Ning Status Blog.

FAO PAUL HAZELDEN

Hi Paul

Thought I would start this here so that it's out of my other discussion so it's a little clearer to discuss.

I have created two ways to add the form and a demo is here :  https://jr-images.ning.com/my-form

The first way is by using some jquery and of course html. The css etc you would know how to do that

INSTRUCTIONS FOR THIS OPTION

1, You can either create a custom page or you can add this to any page

2, add an html block to the page then click the little html button and add a div, I used this  <div class="formContainer"></div> You can add a title to the html block or can be left blank

3, save this then save the page

4, Go to your Social Site manager then in the custom code end of page section add the html into it like this

<script>
x$(document).ready(function(){
x$('<form class="myForm"><div class="myForm-body"><h1>MY FORM</h1><div><label for="firstName" class="label">First Name</label><input name="firstName" type="text" id="firstName" size="10"></div><div><label for="lastName" class="label">Last Name</label><input name="lastName" type="text" id="lastName" size="15"></div></div></form>').appendTo('.formContainer');
});
</script>

5, now your can add your css in the design studio, i just added a little margin just for demo

.myForm-body div{
margin:20px;
}
.myForm .label{
margin-right:10px;
}

Now the form will show on any page you add an html block with that div in it so you can place it whever you want.

 

SECOND OPTION ADDING INTO THE HTML BLOCK ITSELF

For this one we simple add an html block to a page, click the little html button ( tip you normally can tell it's in html mode as when you click in the text area it turns yellow ) then add your for html code and then just add your css. Here is what I added

<form class="myForm"><div class="myForm-body"><h1>MY FORM</><div><label for="firstName" class="label">First Name</label><input name="firstName" type="text" id="firstName" size="10"></div><div><label for="lastName" class="label">Last Name</label><input name="lastName" type="text" id="lastName" size="15"></div></div></form>

Hope that helps you get started

Bizz :-)

 

 

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

  • Thank you: that's an excellent start.  I'll look more tomorrow.

  • By the way, I tried the File Manager again, and I cann't select any files: I select 'Click to Add Files' and can navigate the directory tree, but cannot see any files of any type.  Is there some setting I have missed?

    • If you look down to the bottom right when the screen opens to select a file you need to change this to all files then you will see your files, images etc from the chosen folder

      10236305885?profile=RESIZE_400xCHANGE THE DROP DOWN LIST TO THIS

      10236306469?profile=RESIZE_400x

      Now you should see your files etc, click on what one you want or multi select using the ctrl key then choose open and they will then get added to the top of your file manager, then click the ADD FILES button to add them

      • Fantastic!  Thank you.

        ... so why did the Ning support people not tell me this, when I complained i could not upload files?  Okay, you probably can't answer that one.

         

        • No worries glad to help Paul. To be honest I don't think Ning realise this is what is happening that that little menu is doing that. Might have to pop a post up about it for them to see, although I think they are a little pre-occupied at the moment with the war on thier doorstep.

  •  Thank you.  I now have the form, just need the processing.  If I can get two simple details working, I can prbably work out the rest.

    * Display an error message if I press 'Send' and the form is emply.

    * Send an email with the form content if the validation succeeds.

    • Ok will add that to the form page demo when I get a chance today for you Paul and add it here a little later

      • If you go to my site again I have added another form which can't be submitted without the fields not being filled in, you can give it a try to show what happens.

        Here is that code for the form, it is basically the same but with the submit button added and also a required added to the fields

        <form class="myForm2">
        <div class="myForm2-body">
        <h1>MY FORM 2</h1>
        <div><label class="label" for="firstName">First Name</label><input id="firstName" name="firstName" size="10" type="text" required/></div>
        <div><label class="label" for="lastName">Last Name</label><input id="lastName" name="lastName" size="15" type="text" required/></div>
        <div><label class="label" for="emailAddr">Email</label><input id="emailAddr" name="emailAddr" type="email" required/></div>
        <div class="buttonBox"><input type="submit" name="submit" id="submitButton" value="submit"></div>
        </div>
        </form>

        • I'm very sorry: I was unclear.  The need is for validation of the fields - I was just using 'empty fields' as a simple example of validation.  I use 'required' when that is sufficient, but in general I perform validation on the input using a script to determine if the form is valid.  Here is an example I produced a few years ago, where I generate a random 4 character code to be entered, as a way of preventing spam:

          http://mad-bristol.org.uk/contact/index.php

          An error message is displayed if the validation code is not supplied.  I know that some robots can detect and get around this technique, but so far it has worked well enough.

          Anyway, I want to run a script to validate the input; if it fails, display an appropriate error message while retaining the initial input; if it does not fail, send an email with the message content and display a 'successful' message - or load a page with a 'message sent' message.

          I was able to display the form fields, but what I could not do - what I was told I could not do without them making changes to Ning - was run a script to make the form do something useful.  Sorry - I thought that was sort of implicit in 'create a form', as there is little point is displaying a form on the screen if you can't check the content and them do something with it...

          Make A Difference - Contact
          Make A Difference - Contact
          • You could add a little script to check the code box like this, the code refers to the form on my site, so just change the class for your form and the input name for your code box, mine was named #entryCode

            <script>
            x$(document).ready(function(){
            x$('.myForm2').submit(function(){
            if(x$('#entryCode').val()!== "ZMJB"){
            alert('Wrong Entry Code, please re-enter the correct code');
            return false;
            }
            });
            });
            </script>

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

Alina Langley replied to Suzie Nielsen's discussion
Ning 2.0 For Sale
"Do you atill have a NING 2.0 site? I am looking for one, please DM me :)"
Saturday
Alina Langley updated their profile photo
Saturday
Alina Langley updated their profile
Saturday
LEO Mobile App Builder updated their profile
Mar 26
Aase Lillian replied to Aase Lillian's discussion
Community - activity page
"Ok, thank you. Please send me details as I have no idea on how to do it. "
Mar 19
Aase Lillian and ⚡JFarrow⌁ are now friends
NC for Hire
Mar 19
⚡JFarrow⌁ updated their profile photo
Mar 18
⚡JFarrow⌁ replied to Aase Lillian's discussion
Community - activity page
"Yes you can add emojis to your community pretty much anywhere you like.
If you need some help…"
Mar 18
Aase Lillian updated their profile
Mar 18
Aase Lillian posted a discussion
Hi all. Is it possible to add emojis to the community? I also wish the activity page to include…
Mar 18
Donna MacShoe updated their profile photo
Mar 6
Adul Rodri is now friends with ANGE.L LUAR and Margarida Maria Madruga
Feb 14
More…

Meanwhile, you can check our social media channels