Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4620472
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:33:54+00:00 2026-05-22T02:33:54+00:00

We like using jQuery templates with SVG for example to show a Product with

  • 0

We like using jQuery templates with SVG for example to show a Product with a nicely styled price.

Say we have an SVG that represents a complicated layout. Is it possible to have the <input> tags nested in the SVG and still work within HTML 5? Are there alternatives within SVG to input data from the user, maybe extracting them with Knockout.js?

I know you could use the SVG in the sense of a background graphic and hack the positions so that the form fields line up. I am really interested in having the input statements flowed by the SVG if possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:33:55+00:00Added an answer on May 22, 2026 at 2:33 am

    You can use foreignObject. A small example :

    <?xml version="1.0" standalone="yes"?>
    <svg xmlns = "http://www.w3.org/2000/svg" width="100%" height="100%">
        <rect x="25" y="25" width="250" height="200" fill="#ff0000" stroke="#000000"/>
        <foreignObject x="50" y="50" width="200" height="150">
            <body xmlns="http://www.w3.org/1999/xhtml">
                <form>
                    <input type="text"/>
                    <input type="text"/>
                </form>
            </body>
        </foreignObject>
        <circle cx="60" cy="80" r="30" fill="#00ff00" fill-opacity="0.5"/>
    </svg>
    

    This is a standard SVG, but I added HTML elements between the rect and the circle using the foreignObject tag. The stack order is respected, the circle being in front of the inputs.

    Other solutions exists in “pure” SVG, but they heavily rely on JavaScript. Here an example : http://www.carto.net/papers/svg/gui/textbox/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using .tmpl() to fill out templates like so <script type=text/x-jquery-tmpl id=template> <form
I have a simple HTML page (ratings.html) that I'm trying to test using HtmlUnit.
I have a jquery template where I have to combine some variables together like
I have a simple webpage that uses the jquery template plugin to dynamically load
Update I want to avoid compiling the templates client-side, and have them compile during
I've been using the jQuery tmpl library for some projects and really liking it.
we have developed an rails project using rails 3 and mysql, it has images,
I have been a user of jQuery (and some of its minor plugins) for
We are starting to create an application using JavaScript and HTML5 which will use
Are there any examples out there on how to integrate HTML5Boilerplate into Symfony? The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.