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

Mark Thorpe posted a discussion
I've run networks based on this platform in the past and never have I seen it in such dissarray as…
7 hours ago
⚡JFarrow⌁ liked Bizz ( John )'s discussion How To Create Unlinked Pages In Groups Easily
Friday
Suave liked Suave's profile
Friday
Suave updated their profile photo
Nov 14
Suave updated their profile
Nov 14
Suave liked Suave's discussion I AM LOOKING FOR DEVELOPER ASSISTANCE WITH ADDING AUTOMATIC MUSIC TO MY HOME PAGE
Nov 14
Suave is now a member of Ning Creators Social Network
Nov 14
Chaz is now friends with Kathleen (SunKat) and Margarida Maria Madruga
Nov 13
Mark Thorpe posted a discussion
Hi there,Just setting up a network and wondering how I can get the links that new mmebers fill out…
Nov 13
Fernando Bisbal posted a discussion
There are people whose profile does not show the group block and we do not know which groups they…
Nov 7
Fernando Bisbal posted a discussion
There are people whose profile does not show the group block and we do not know which groups they…
Nov 7
Michael Rua Franco replied to Michael Rua Franco's discussion
Problems with Polyfill.io in my site
"Thank you so much for your reply Vlada "
Nov 6
More…

Meanwhile, you can check our social media channels