Jquery Validation Plugin Error This[0] is undefined – Sharepoint Online Add-in Development

I’m development a Sharepoint Hosted Add-in in Sharepoint Online tenant. I’m using Jquery and Jquery Validation to make form validation, but I have a issue with JQuery Validation because of get error this[0] is undefined always in button Event.

I checked:

  • Reference valid ID in form.
  • Load Jquery and Jquery Validation scripts inside page.
  • Verified in Browser Debugger that scripts load with status 200.
  • Wrap script in a ready event handler [Jquery].

I’m new in Sharepoint development and I don’t know if I need enabled something in tenant, site collection or this is a limitation to Sharepoint online ?

This is my currently code in Page.aspx:

Section to load Scripts

 <asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">:      <meta name="WebPartPageExpansion" content="full" />      <!-- Css Files -->     <link rel="stylesheet" type="text/css" href="../../Content/AdminLte/bower_components/bootstrap/dist/css/bootstrap.min.css" />     <link rel="stylesheet" type="text/css" href="../../Content/AdminLte/bower_components/font-awesome/css/font-awesome.min.css" />     <link rel="stylesheet" type="text/css" href="../../Content/AdminLte/dist/css/AdminLTE.min.css" />     <link rel="stylesheet" type="text/css" href="../../Content/AdminLte/dist/css/skins/_all-skins.min.css" />      <!-- Javascript Files -->      <SharePoint:ScriptLink Name="sp.js" runat="server" OnDemand="true" LoadAfterUI="true" Localizable="false" />      <script type="text/javascript" src="../../Scripts/jquery-3.3.1.min.js"></script>     <script src="../../Scripts/Plugins/jquery-validation/jquery.validate.js"></script>     <script src="../../Scripts/Plugins/jquery-validation/messages_es.js"></script>      <!-- Others Javascript Files -->      <script src="../../Scripts/LibreriasSP/sharepointplus-5.2.js"></script>     <script src="../../Scripts/Plugins/SweetAlert2/sweetalert.min.js"></script>      <script src="../../Scripts/Modulos/Audits/create.js"></script>  </asp:Content> 

Html Section:

<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">      <WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" Title="loc:full" />      <form id="FormCreate" name="FormCreate">         <div class="box-body">             <div class="col-sm-12">                 <div class="form-group col-sm-4">                     <label for="titulo">Title (*)</label>                     <input type="text" class="form-control" name="Title" id="Title" required>                 </div>                  <div class="form-group col-sm-4">                     <label for="codigo">Smart Code (*)</label>                     <input type="text" class="form-control" name="smartCode" id="smartCode" required>                 </div>             </div>         </div>           <div class="box-footer">             <button type="button" class="btn btn-primary" id="BtnCreate">Create</button>         </div>      </form>  </asp:Content> 


$  (document).ready(function () {      // foo ...      $  ('#FormCreate').validate({         rules: {             thisval: "required"         }     });       $  ("#BtnCreate").on("click", function () {          if (!$  ("#FormActAuditoria").valid()) {  <=== Error Here...             console.log("error");         }      });  }); 

Redirection Plugin: Change permalink structure to remove date, want to retain and pass query strings (?utm_)

I have changed the permalink structure from /%year%/%monthnum%/%postname%.html to /%postname%/

I have added the following regex rule to the Redirection plugin:

Source URL: ^/([0-9]{4})/([0-9]{2})/([^/]+).html(.*)$   Target URL: https://example.com/$  3/ 

This works and redirects links from social media appended with ?utm_medium=social&utm_source=pinterest etc., but strips that parameter from the target.

How may I edit my regex to have it pass the query string and append it to the new URL format?

Thank you.

First WordPress plugin to create page-specific categories

I would love some feedback about this very simple WordPress plugin (my first one).

It’s intended to create page-specific categories (via the creation of a custom taxonomy).

It’s working on my staging website, would you consider it safe to publish it live?

Any feedback appreciated, thanks!

<?php /* Plugin Name: Add page-specific taxonomy to Pages  Description: This plugin will add categories that are specific to your pages. they are NOT shared with post categories. */   add_action( 'init', 'pages_tax' ); function pages_tax() {  register_taxonomy(   'pagecategories',   'page',   array(     'label' => 'Page categories',     'labels' => array(     'name' => 'Page categories',     'singular_name' => 'Page category',     'all_items' => 'All page categories',     'edit_item' => 'Édit page category',     'view_item' => 'View page category',     'update_item' => 'Update page category',     'add_new_item' => 'Add page category',     'new_item_name' => 'New page category',     'search_items' => 'Search page categories',   ),     'hierarchical' => true,     'public' => false,     'publicly_queryable' => false,     'show_ui' => true,     'show_in_menu' => true,     'show_in_nav_menus' => false,     'show_tagcloud' => false,     'show_in_quick_edit' => true,     'show_admin_column' => true,     'show_in_rest' => false,    ) ); } register_taxonomy_for_object_type( 'pagecategories', 'page' );  ## allow filtering of pages by taxonomy on the dashboard  function filter_pages_by_taxonomies( $  post_type, $  which ) {      // Apply this only on a specific post type     if ( 'page' !== $  post_type )         return;      // A list of taxonomy slugs to filter by     $  taxonomies = array( 'pagecategories' );      foreach ( $  taxonomies as $  taxonomy_slug ) {          // Retrieve taxonomy data         $  taxonomy_obj = get_taxonomy( $  taxonomy_slug );         $  taxonomy_name = $  taxonomy_obj->labels->name;          // Retrieve taxonomy terms         $  terms = get_terms( $  taxonomy_slug );          // Display filter HTML         echo "<select name='{$  taxonomy_slug}' id='{$  taxonomy_slug}' class='postform'>";         echo '<option value="">' . sprintf( esc_html__( 'Show All %s', 'text_domain' ), $  taxonomy_name ) . '</option>';         foreach ( $  terms as $  term ) {             printf(                 '<option value="%1$  s" %2$  s>%3$  s (%4$  s)</option>',                 $  term->slug,                 ( ( isset( $  _GET[$  taxonomy_slug] ) && ( $  _GET[$  taxonomy_slug] == $  term->slug ) ) ? ' selected="selected"' : '' ),                 $  term->name,                 $  term->count             );         }         echo '</select>';      }  } add_action( 'restrict_manage_posts', 'filter_pages_by_taxonomies' , 10, 2);  ?> 

[GET][NULLED] – Rocket Genius Gravity Forms WordPress Plugin v2.4.8.9


[GET][NULLED] – Rocket Genius Gravity Forms WordPress Plugin v2.4.8.9

Magento 2 validate the form input using plugin and save the modified data

I am using custom plugin to validate the user input for customer profile.

I have created Module Company_Module and create di.xml file in etc to verify the input given by the user:

<type name="Magento\Customer\Controller\Account\EditPost">   <plugin name="restrictEditInfo" type="Company\Mymodule\Plugin\Controller\Customer\EditPost" />  </type> 

For this in my EditPost plugin file i have given following code:

public function aroundExecute(     \Magento\Customer\Controller\Account\EditPost $  subject,     \Closure $  proceed ) {       $  resultRedirect = $  this->resultRedirectFactory->create();     $  requestParameters = $  subject->getRequest()->getPostValue();      if ($  this->preg_match('/[\'^£$  %&*()}{@#~?><>,|=_+¬-]/',$  requestParameters['firstname']))     {                               $  this->messageManager->addError(__('Special Characters are not allowed.'));             return $  resultRedirect->setRefererOrBaseUrl();     }  return $  proceed();    }  

This validates the input given by the user and prevent form saving if any special characters are given by the user.

Now issue is: I want to send modified output. It means if customer enter any special characters in input then i want to remove those tags and save it as normal string. To do so i am doing preg_replace which works fine but to save the modified data i am passing the $ requestParameter in proceed method.

    return $  proceed($  requestParamaters);   

To save the modified data i am passing $ requestparamaters In proceed method but it’s not working.

To debug this i checked after this around method call is going into controller which is showing the same input given by the user not the modified output i given from the proceed method.

How can i pass my modified input to save? How can i pass modified output for save?

Any help would be appreciated!

[GET][NULLED] – Mailster – Email Newsletter Plugin for WordPress v2.3.18


[GET][NULLED] – Mailster – Email Newsletter Plugin for WordPress v2.3.18

Install Yoast SEO Premium Plugin On Your WordPress Site for $5

What you will get with 5 $ ? I will install yoast SEO premium plugin + Provide Zip File. Why your website need Yoast SEO premium plugin ? You can use multiple focus keywords up to 5 keywordsOrphaned contentRedirecting the old URLs to new onesIncredible Internal LinkingSocial Preview To Boost Your Social Media Activity What’s it the version of the plugin? It’s the latest version What we need from you ? Your wp-admin credentialsGmail Credentials for GSC And GA Setup What bonus we offer for free? Fast delivery for you it’s free Why you choose us ? 100% Satisfaction guaranteed with 5★ Rating Contact us: I am always online, and happy to help you

by: aadilhasan
Created: —
Category: WordPress
Viewed: 183

[GET][NULLED] – Master Popups – WordPress Popup Plugin for Lead Generation v2.6.1


[GET][NULLED] – Master Popups – WordPress Popup Plugin for Lead Generation v2.6.1