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 9212279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:29:17+00:00 2026-06-18T01:29:17+00:00

I do have a table which contain some data in it and a form

  • 0

I do have a table which contain some data in it and a form besides it.I am binding this form on click of any row of the table means the data related to the respective row gets filled to the form which are coming from the database,my concern is that out of this data from the database one of the field is “def_text” which is basically stored in the HTML format but i want to show it in plain text format in the form where i am binding it.

<form class="form report live " data-table="contractlistTable" id="contractlistForm"  data-bind="foreach:items"  target="_blank" method="post">
            <input type="hidden" name="pid" id="pid" />
            <div class="control-group ">
                <label class="control-label">Title</label>
                <div class="controls">
                        <input type="text" id="title" name="title" required title="required" placeholder="title" data-bind="value:title" />
                        <input type="checkbox" id="active" name="active" class="check" data-bind="checked: active=='true'"  />Active
                </div>
            </div>
            <div class="control-group ">
                <label class="control-label">Default Text</label>
                <textarea id="def_text" name="def_text" class="htmleditor" rows="9" cols="50" style="width: 600px; height: 190px;" data-bind="value:def_text"> </textarea>
            </div>
</form>

this is the form and the code for the table is

<table class="table table-hover table-bordered" id="contractlistTable" style="width: 304px;">
            <thead>
                <tr>
                    <th>Title</th>
                    <th>Active</th>
                </tr>
            </thead>
            <tbody data-bind="foreach:items" class="bindable" data-model="companycontract">
                 <tr data-bind="attr:{'data-value': id,'data-index':$index}">
                    <td data-bind="text:title"></td>
                    <td>
                        <!-- ko if:active === 'true' -->
                        <span class="badge badge-success"></span>
                        <!-- /ko -->
                        <!-- ko if: active === 'false' -->
                        <span class="badge"></span>
                        <!-- /ko -->
                    </td>
                </tr>
            </tbody>
        </table>

and for binding it i am using Knockout.js

$(function () {
        var myForm = "";
        var formFields;
        $("#contractlistTable tbody tr").live('click', function () {
            var data = [model.companycontract[$(this).attr("data-index")]];
            if (!!formFields) formFields.refill(data);
            else {
                formFields = new DynamicModel(data);
                ko.applyBindings(formFields, document.getElementById("contractlistForm"));
            };

            var id = [$(this).attr("data-value")];

            var kunnr = $('#kunnr').val();
            $('.report').attr("action", 'http://wcidevapps.com/salescentral/pcontract.php?ct=i&knr=' + kunnr + '&cid=' + id);

        });
 });

so please help me on this..

  • 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-06-18T01:29:18+00:00Added an answer on June 18, 2026 at 1:29 am

    On your php code you can use strip tags to clear html tags….
    Check this: http://php.net/manual/en/function.strip-tags.php

    Use like:

    $test = '<p>Test</p>, <h1> Big test </h1>';
    echo strip_tags($test);
    

    Result: Test, Big test

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

Sidebar

Related Questions

Ok, I have a table which contains multiple rows. Each row contains some data
I have a dashboard in my website which contain some entries in table, each
I have a table which already contains an index in MySQL. I added some
I have the query to select some columns from two tables, which must contain
I have one table TABLE_SUBJECT which contain a number of subjects. I need to
I have a table which has a NVARCHAR column, which could contain a GUID
Ok I have a Project_Assigned table which contain a list of account_ids assigned to
I have a table called TPM_TASKS which contain all tasks, as well as a
I have a single product table with multiple fields which contain user evaluations of
I have a table containing hierarchical data. There are currently ~8 levels in this

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.