I'm sorry if this has been answered somewhere else. I really did search A LOT but nothing quite answered my question. Also, I'm a bit new, so please keep that in mind when answering...
I have a timeline that I'm using from http://timeline.verite.co/ It is a great timeline and can be udpated via a JSON file. However, I want to be able to update the JSON file via a user form on my website.
For example: There is an Admin page...the code for the form area is here:
<div id = "contentarea">
<div id="tab1">
<form id="randomevents" method="POST" action="#">
<ul>
<li><label for="event_title">Event Title</label>
<input id="event_title" type="text"></li>
<li><label for="event_details">Event Details</label>
<textarea rows="15" cols="44"></textarea></li>
<li><label for="date">Date: ex "mm/dd/yyyy"</label>
<input id="date" type="text"></li>
<div id="submitevent"><button type="submit" class="button">Submit</button></div>
</ul>
</form>
The timeline is located on another page...it's code is this:
<div id="timeline-embed"></div>
<script type="text/javascript">
var timeline_config = {
width: '100%',
height: '300px',
source: 'data.json',
start_at_end: false,
start_at_slide: '1',
hash_bookmark: true,
font: 'Bevan-PotanoSans',
maptype: 'watercolor',
css: 'js/maintimeline/compiled/css/timeline.css',
js: 'js/maintimeline/compiled/js/timeline-min.js'
}
</script>
The JSON file looks like this (partial):
{
"timeline":
{
"headline":"Helen Queen",
"type":"default",
"text":"A beautiful mother, wife, woman",
"date": [
{
"startDate":"1924,1,26",
"headline":"A little girl is born into a big family!",
"text":"<p>Helen is born on January 11, 1924. She is the fifth girl and the eight overall child!</p>",
"asset":
{
"media":"images/fortimeline/helen.jpg",
"credit":"",
"caption":""
}
},
What I want is for a user to enter content into the form on the Admin page and have it update (and add to) the JSON file, which then will automatically update the Timeline page. Like I said, I've searched for answers but nothing quite matched up or the answers were to confusing for me to follow!
Thanks!