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

  • Home
  • SEARCH
  • 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 7279147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:02:29+00:00 2026-05-28T23:02:29+00:00

I have this form: $form = array( ‘<form name=backup-form class=backup-form method=post action=#>’, ‘<fieldset class=backup-fields>’,

  • 0

I have this form:

$form = array(
        '<form name="backup-form" class="backup-form" method="post" action="#">',
            '<fieldset class="backup-fields">',
                '<fieldset class="display-wrapper">',
                    '<label for="display" class="display-label">Backups</label>',
                    '<input type="text" name="display" class="display" value="' . $this->backups(false,true) . '" autocomplete="off" readonly="readonly" />',
                '</fieldset>',
                '<fieldset class="action-wrapper">',
                    '<button type="submit" name="clean" class="clean">Clean All</button>',
                    '<button type="submit" name="create" class="create">Create</button>',
                '</fieldset>',
            '</fieldset>',
        '</form>',
        '<div class="message-handling" class="message-handling"></div>'
    );
$form = implode("", $form);
echo $form;

And I’m trying to bind an even to each submit button like this:

$('.backup-form .clean').on({
    click: function() {console.log('Clean Button Pressed');}
});

or

$('.main-actions .backup-form').delegate('.clean', 'submit', function() {
    console.log('Clean Button Pressed');    
});

But none of it works. What’s happening ? Or what should I do to make it work ?

  • 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-28T23:03:41+00:00Added an answer on May 28, 2026 at 11:03 pm

    try, if you are dynamically adding the form

    $(function(){
        $(document).delegate('.clean', 'submit', function() {
            console.log('Clean Button Pressed');    
        });
    }
    

    or if not this should work

    $(function(){
    $('.main-actions .backup-form').delegate('.clean', 'submit', function() {
        console.log('Clean Button Pressed');    
    });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form: <form action= method=post> <label for=color>Color:</label> <input type=text style=width: 195px; name=color
I have this link: <a href=<?php echo $this->url(array('controller'=>'index','action'=>'form'),NULL,TRUE);?>> Form </a> With this I get
I have this simplified form: $this->form = new \Zend_Form(); $this->form->setAction($request->currentPath()); $this->form->setMethod('post'); $this->form->addElement('text', 'firstName', array(
Problem 1. I have this class: public class ContactGroups { // Form an array
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
I have this form: <form name=customize> Only show results within <select name=distance id=slct_distance> <option>25</option>
I have this array (JQuery) where I add all my form's controls, it looks
I have a form with an array of text fields. The user (through javascript)
I have this array for doctrine to process many to many form and save
I have this in a Zend_Form 's init method: $username_validators = array( 'Alpha', array('StringLength',

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.