PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Gravityfroms as a cutom bib maker?

  1. rusti
    Member

    I teach k-8 grades and many of the online bibliography makers are way above my kids heads for internet sites.

    I'd like to make a simple form they could fill out that had the site title, url, and date and it would spit out the info formatted for them below the form. I know enough about HTML-CSS-PHP to format the data as necessary, is there a way to output the data entered into a form below it? Thanks.

    Posted 15 years ago on Monday October 19, 2009 | Permalink
  2. Are you only wanting to display the data that is submitted, or are you wanting to display all the form data that is submitted by previous users? I'm not clear on how it should work. Any additional info would be help in determining if Gravity Forms can meet your needs.

    Posted 15 years ago on Monday October 19, 2009 | Permalink
  3. rusti
    Member

    Thanks for taking the time to respond Carl.

    I just would like to have three fields so the kids can fill out the

    • site name
    • url
    • date

    Then it spits our these three pieces of info (on a new page or just below the form, preferably number two) and I style the output correctly with CSS. Then they copy and paste this info to the powerpoint or document.

    Much like this http://www.oslis.org/orig-steps/resources/cm/mlacitationse but much simpler for very young students.

    Thanks

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  4. You can do something like this easily enough. If you want it to appear in the form page, first, you'll need to add some php to the the page template to display the field values. Something like this

    <?php echo $_GET["variablename"]; ?>
    Then you'll create your form, and set the redirect/confirmation page to the same URL the form is on and then create the query string with the variable names

    sample settings screenshot: http://grab.by/aLB

    once you have everything in place, you should be able to post the form, and it will pass the variables back to the page and write out the values, formatted however you would like.

    posted form screenshot showing variables written to page: http://grab.by/aLy

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  5. rusti
    Member

    You sir, are a gentleman and a scholar. I will give this a try and get back to you with a question or two I'm sure.

    Thanks for taking the time!

    Rusti

    How would I arrive at my variable name for the php snippet that you posted?

    Also, can I stick the php snippet where ever I like in the body or does it have to go in a specific spot?

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  6. You define the variable name when you're setting up the query string on the confirmation settings.. it can be pretty much whatever you would like, you just have to define it there, then call that name where you want it to appear in the page.

    example query string:

    sitename={Site Name:1}&websiteurl={Website URL:3}&pubdate={Date:5}
    you could call the site name variable "foo" if you wanted, as long as it's passing the value from the correct field. If you did, you'd simply get the value for "foo" from the querystring.

    <?php echo $_GET["foo"]; ?>
    Note: these variable names are reserved for WP functions and you can't use them.

    m, p, post_parent, subpost, subpost_id, attachment, attachment_id, name, hour, static, pagename, page_id, second, minute, hour, day, monthnum, year, w, category_name, tag, cat, tag_id, author, author_name, feed, tb, paged, comments_popup, meta_key, meta_value, preview

    As far as placing the content on the page, you will most likely want to create a new page template (actual php file) to place the form and the new content on. Unless you have a plugin like PHP Exec running, you can't normally execute php from within the content field.

    If you do create a new page template, remember to associate it with the page in the WP admin (on right sidebar).

    You can place your code snippet wherever you would like on the new page template. It's really up to you. In my quick test, I just put it below the "the_content" token.

    <div class="post-content">
    	<?php the_content(); ?>
    	<!-- begin form output -->
    	<div>
    		<?php echo $_GET["sitename"]; ?>
    		<?php echo $_GET["websiteurl"]; ?>
    		<?php echo $_GET["pubdate"]; ?>
    	</div>
    	<!-- end form output -->
    </div>

    Hope that helps.

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  7. rusti
    Member

    Alright Kevin, First I want to say thank you. I'm almost there, i'm so close I can taste it. I'll apologize for my limited vocabulary now, I've always been scared of forms (that's why I bought gravityforms!?) but I will try to explain this.

    It is working, but there is a small problem. Only the site name is getting passed as variables to the form output. 'site name' is the only thing output, the other two are blank <p> tags.

    So, I'm guessing there is a disparity between my assigning names to the data and what i have output?

    The live site can be seen here:
    http://www.greenermountain.com/simple-bibliography/

    Here are the php tags i inserted into my page template:

    <div id="biblio">
    		<p><?php echo $_GET["sitename"]; ?></p>
    		<p><?php echo $_GET["websiteurl"]; ?></p>
    		<p><?php echo $_GET["pubdate"]; ?></p>
    	</div>
    	<!-- end form output -->

    Here are my gravity form settings
    http://www.greenermountain.com/wp-content/uploads/2009/10/grav-bib.gif

    I really appreciate this, I"m so close I can taste it. By the way, I'm using the url as a text string so I don't have to worry about the hyperlink getting copied as well.

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  8. You're right, you're very close. Nice job. It looks like the query string isn't passing the value for the website url and date.

    example: ?sitename=MySite&websiteurl=&pubdate=

    This might be that you either 1. Copied my example exactly or 2. Changed field names and didn't update the query string afterward.

    Go to the confirmation tab to where you edit the query string and remove the values for the URL and date {Website URL:3}, etc. Position your cursor where you removed each value, then click on the "insert form field" drop down and select the appropriate field from the list. It will insert the correct field ID in that spot. Do this for both the website and date fields.

    Save the form and try it again. You should be passing the correct form field values in the query string at this point.

    Let us know if that works for you.

    Posted 15 years ago on Tuesday October 20, 2009 | Permalink
  9. rusti
    Member

    It's finally finished, with a slight name change so the links above won't work. Here it is
    http://www.greenermountain.com/simple-citation-maker/

    I'd like to thank you guys for putting out such a great product, I thought long and hard about the developer license, but I'm glad I have it now. Now to find more ways to use it to get my moneys worth! :)

    Thanks for all the help. I have started doing screencast tutorials of various WP things. (you can see some of the efforts here http://www.greenermountain.com/blog/ )I will put together a video tutorial on how I accomplished this and I'll be sure to give you the credit you deserve Kevin!

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  10. Wonderful. It looks great! Thanks for the link and I'm really glad you're enjoying the plugin. Let us know if we can help out any other way.

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  11. seemsse
    Member

    I'm attempting to send data to a new page, but it keeps going back to a blank form page after submitting the form. I have setup all the variables to be passed and setup the redirect page.

    Posted 14 years ago on Friday January 29, 2010 | Permalink
  12. We would have to see your form setup in order to determine the problem. Use the Contact Us form and send us a WordPress login for this site, describe what you are trying to do, and we can take a look.

    Posted 14 years ago on Friday January 29, 2010 | Permalink
  13. rusti
    Member

    Hi again guys! I finally implemented this form on a working site and I have everything working honky dori, but the Date is spit out as 2010-4-19. I'd really like to have it output the date 4-19-2010. Can anything be done?

    live example and finished product http://www.fnwsu.org/sheldon/simple-citation-maker/

    Posted 14 years ago on Monday April 19, 2010 | Permalink