Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2020, 07:02 AM   #1
andy_k
Junior Member
andy_k began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2020
Device: none
HTML Form in Sigil / Epub

Hi all

Seems like Sigil doesn't like me trying to add an html <form> section with radio buttons within an html file.

Could anyone clarify more broadly what the constraints are with interactivity and Sigil / epub format?

Many thanks!
andy_k is offline   Reply With Quote
Old 04-28-2020, 09:07 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil "likes" form code just fine. You just need to make sure it adheres to the more strict xhtml rules and not the lazier html (Those are EPUB requirements, not Sigil).

Also, although it will render fine in Preview, form code is not likely to validate (nor be at all useful) in EPUB2.

The following code renders (and validates) fine for me in an EPUB3.

Code:
<form>
  <input type="radio" id="male" name="gender" value="male"/>
  <label for="male">Male</label><br/>
  <input type="radio" id="female" name="gender" value="female"/>
  <label for="female">Female</label><br/>
  <input type="radio" id="other" name="gender" value="other"/>
  <label for="other">Other</label>
</form>
Hooking it up to javascript for functionality is entirely up to you. Interactive ebooks is not at all my forte (or interest). Nor is it a Sigil topic. It's an EPUB topic
DiapDealer is offline   Reply With Quote
Old 04-28-2020, 09:39 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
FYI - Sigil does have User preference settings to enable and disable javascript in Sigil. So if you go the javascript in epub3 route, make sure to enable javascript in the Sigil preferences.
KevinH is online now   Reply With Quote
Old 04-28-2020, 10:03 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
And possibly allow local storage? I'm admittedly weak on what interactivity/javascript might require to allow something like this to work.
DiapDealer is offline   Reply With Quote
Old 04-28-2020, 01:08 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by andy_k View Post
Seems like Sigil doesn't like me trying to add an html <form> section with radio buttons within an html file.
Sigil displays forms just fine. You can test it with this old RTL Test epub.
Before testing make sure to select Preferences > General Settings > Security, check both options and restart Sigil.

Last edited by Doitsu; 04-28-2020 at 01:25 PM.
Doitsu is offline   Reply With Quote
Old 05-01-2020, 03:51 AM   #6
andy_k
Junior Member
andy_k began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2020
Device: none
Many thanks all for your helpful responses
andy_k is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
endnotes in epub with Sigil, multiple html BMaloney Sigil 9 10-10-2019 04:34 PM
how to put EPUB articles together to form new doc calibrecali ePub 1 07-23-2013 02:27 PM
html to epub via Sigil or Calibre? Bigo2 Calibre 2 07-01-2012 02:07 AM
Smooth workflow from HTML to Sigil epub useroo Sigil 1 07-04-2011 12:31 AM


All times are GMT -4. The time now is 01:52 PM.


MobileRead.com is a privately owned, operated and funded community.