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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:31:11+00:00 2026-06-16T16:31:11+00:00

I am attempting to insert a textarea into a JQuery dialog and I am

  • 0

I am attempting to insert a textarea into a JQuery dialog and I am getting hung up on the syntax of how the dialog I have to work with is set up (I didn’t write the dialog by the way, I just want to make changes to it). I have looked at some of the other questions that are similar to this on this site but they don’t seem to answer my question so I am hoping someone can shed some light on this for me.

Here is the code:

$('.rejection_toggle').button().click(function(event) {
 var $dialog = $('<div />', {
   text: Drupal.t('Are you sure you want to reject this form? If so, then please leave a comment as to why you are rejecting it.')
    })
 var $button = $(this);
 $('body').append($dialog);
 $dialog.dialog({
  title: Drupal.t('Reject this form?'),
  buttons: {
      'Reject': function (event) {
        var $submitID = $button.attr('id').replace('rejection-toggle', 'approval-buttons-reject'),
        $submitButton = $('#' + $submitID);

        $submitButton.click();
        $dialog.dialog('close');
      },
      'Cancel': function (event) {
        $dialog.dialog('close');
      }
    }
  });
  return false;
});

So how would I go about inserting a textarea before the buttons?

Thanks.

  • 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-16T16:31:13+00:00Added an answer on June 16, 2026 at 4:31 pm

    Ok I figured it out. I need to add:

    var textArea = $('<textarea style="width:100%" />'); 
    $dialog.append(textArea);
    

    After the var $dialog line.

    Now I need to figure out how to get the input back into Drupal.

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

Sidebar

Related Questions

I am attempting to insert text from a database into a custom TextArea component,
I am attempting to insert an image into a rich text file. I have
I'm attempting to insert a snippet into an iframe through jQuery with the following:
I have been attempting to insert a VLookup formula into a column using VBA.
Attempting to insert an escape character into a table results in a warning. For
I am attempting to insert tomorrow's date at 10:00:00 into SQL Server 2005/2008. I
I am attempting to insert a custom behavior into my service client, following the
I am attempting to insert data into a local SQLITE database file from a
In Microsoft SQL Server 2008 I am attempting to insert values into an sql
I'm experiencing an constness issue when attempting to insert a pair into a map.

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.