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

Rebecca Murphy talks about using jQuery templates. The JSON that Rebecca uses looks like:
I'm using Knockout with jQuery and jQuery templates. Assume that I have a template
I have a simple html block like: <span id=replies>8</span> Using jquery I'm trying to
I'd like to check ancestry using two jQuery objects. They don't have IDs, and
I am using Jquery templates to display incoming JSON data I would like to
I'm using jQuery Templates from within the jQuery UI Autocomplete plugin so that I
I'm using jQuery in my current Rails project and I'd like to have some
We like mixing SVG code with JQuery templates. When we save SVG graphics from
I make an AJAX request like so using JQuery: $.ajax({ type: GET, url: getvideo.php,
I'm using jQuery in conjunction with the form plugin and I'd like to intercept

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.