View Single Post
Old 12-22-2011, 10:23 AM   #2
sbell
Meh
sbell began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2011
Location: New York City
Device: nook color, ipad, kindle
Okay, after pouring over the EPUB3 Content Documents thoroughly I finally figured out how to do this: You cannot create the form just in the xhtml file, it needs to be embedded in a container. To get the form to work I needed to load the file into an iframe. But currently to control an iframe in iBooks you'll need to place the iframe in a div. So basically it looks like this:

<div class="box">
<iframe class="content" src="Inset01.html"></iframe>
</div>

Also, in the content.opf file you'll need to add this (bolded) to the file's entry in the manifest:

<item href="Inset01.xhtml" id="Inset" media-type="application/xhtml+xml" properties="scripted" />

You'll also need to add that to the parent page of this file.

There is one issue, though: you can type in the form, but after you flip the page, close the book, or exit iBooks the form resets. Nothing stays. The reason is that the file is reloaded anew each time. I tried to have the iframe load a file from an external url to see if the form could be saved that way, but in iBooks you cannot load external urls apparently. This is more than likely a security measure. So currently I am looking for an alternative way to do this, but the good news is I did at least get the form to call up the keyboard again. If anyone knows how to save the info input into the form I'd love to hear it.
sbell is offline   Reply With Quote