Can I set the value of field for a custom list based on which custom form a user chooses?

New developer. Be gentle, please.

Constraints: I am using SharePoint Designer and SharePoint 2010 behind a firewall so I can’t upload pretty much anything without going to my helpdesk and getting a tech person to do it for me.

Situation: We track “Activities”. There are many points of origin for an Activity request. Different clients give us different information and are going to need custom forms (custom new item forms created through SPD). However, all these forms will create new items for the same custom list, “Activity Management”, and I have workflows already in place to create a new Activity Number each time one is created based on a batch of other stuff that is probably not super relevant. All these workflows were designed for only 1 custom form, though.

I need to create a second form and have it not trigger some of my workflows at this time. My idea is to have my new custom New form auto-fill/pre-populate on load/etc a field that identifies which form it is. Then I just have to make a condition at the top of my workflow to not activate for that form. Then we can do it later by changing that field to a value of my choice, now triggering the desired workflow.

I just can’t figure out how to simply set the value of a field within the html of the form – not hiding anything, not making the field a cascading anything, nothing fancy. I have a default inside the SharePoint List Settings that is “No Form” for when I do things manually. Once I figure this out for this form, I’ll imitate it for each custom Change or Activity request. And we can have as many entry points as my bosses need…

Potential Paths to a Solution: Can I do this within table row itself?

               <tr>                     <td width="190px" valign="top" class="ms-formlabel">                         <H3 class="ms-standardheader">                             <nobr>Form Used</nobr>                         </H3>                     </td>                     <td width="400px" valign="top" class="ms-formbody">                         <SharePoint:FormField runat="server" id="ff95{$  Pos}" ControlMode="New" FieldName="Form_x0020_Used"  __designer:bind="{ddwrt:DataBind('i',concat('ff95',$  Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Form_x0020_Used')}"/>                         <SharePoint:FieldDescription runat="server" id="ff95description{$  Pos}" FieldName="Form_x0020_Used" ControlMode="New"/>                     </td>                 </tr> 

Or, maybe there is a really nifty javascript thing that could be used…

<script type="text/javascript" language="javascript">     function setff95() {         Something     } </script> 

How to get an array of custom blocks by block name

Scenario: I have created a custom block that outputs a list of posts, with control over number of posts, and the taxonomies where the posts can be selected from.

The custom block is nested inside a custom “row” block, and further inside a core “column” block. The registered id of the custom block is e.g. ‘xx/dyno-list’

Need: I need to extract a list of the posts that have been assigned to the custom block via grabbing the data attached to each block, e.g. an array of posts.

Perhaps using something like: wp.data.select('core/blocks').getBlockTypes('tr/dynamic-list') which does not work…

Each custom block has a unique “name” attribute, e.g. “block_one”, so I need to be able to grab the list of custom blocks, i.e. ‘xx/dyno-list’ and then grab the lists of posts within that specific block.

I need this so as to be able to “de-dupe” the posts list between custom post list blocks.

Question: How to grab a list of the custom blocks by their registered name and then by the attribute name

Cannot clone group of Custom Fields in CPT

I have my CPT, and I am trying to clone the group of Custom Fields in my metabox named as Credits.

I have these fields to be cloned each time, when the user hit on + Add Group button:

  1. Text Field
  2. TextArea Field

I have followed this link for reference -> Clone Group of Custom Fields

Now, I believe the code is right, but somehow, I can see only textfield is coming up. I have tried my best to get this working but failed. I need your help on this. I do not want to make use of any plugins for now, since code is already available, it is just that the implementation is a problem.

Code:

function gallery_credit_section( $  meta_boxes ) {     $  prefix = 'prefix-';      $  meta_boxes[] = array(         'id' => $  prefix . 'gallery-credits',         'title' => esc_html__( 'Credits', 'metabox-online-generator' ),         'post_types' => 'gallery',         'context' => 'advanced',         'priority' => 'default',         'autosave' => 'false',         'fields' => array(             array(                 'id' => $  prefix . 'gallery-advisor',                 'type' => 'group',                 'clone' => true,                 'fields' => array(                     array(                         'id' => $  prefix . 'gallery-advisor',                         'type' => 'text',                         'name' => esc_html__( 'Advisors', 'metabox-online-generator' ),                         'placeholder' => esc_html('Author Name', 'metabox-online-generator')                     ),                     array(                         'id' => $  prefix . 'gallery-about-advisor',                         'type' => 'textarea',                         'name' => esc_html__('About Advisor', 'metabox-online-generator')                     )                 )             )         )     );      return $  meta_boxes; } add_filter( 'rwmb_meta_boxes', 'gallery_credit_section' ); 

Result:

Resultant image

As you can see, no name is there for the field, plus there is no textarea field too. Please help. Thanks 🙂

Cannot clone group of Custom Fields in CPT

I have my CPT, and I am trying to clone the group of Custom Fields in my metabox named as Credits.

I have these fields to be cloned each time, when the user hit on + Add Group button:

  1. Text Field
  2. TextArea Field

I have followed this link for reference -> Clone Group of Custom Fields

Now, I believe the code is right, but somehow, I can see only textfield is coming up. I have tried my best to get this working but failed. I need your help on this. I do not want to make use of any plugins for now, since code is already available, it is just that the implementation is a problem.

Code:

function gallery_credit_section( $  meta_boxes ) {     $  prefix = 'prefix-';      $  meta_boxes[] = array(         'id' => $  prefix . 'gallery-credits',         'title' => esc_html__( 'Credits', 'metabox-online-generator' ),         'post_types' => 'gallery',         'context' => 'advanced',         'priority' => 'default',         'autosave' => 'false',         'fields' => array(             array(                 'id' => $  prefix . 'gallery-advisor',                 'type' => 'group',                 'clone' => true,                 'fields' => array(                     array(                         'id' => $  prefix . 'gallery-advisor',                         'type' => 'text',                         'name' => esc_html__( 'Advisors', 'metabox-online-generator' ),                         'placeholder' => esc_html('Author Name', 'metabox-online-generator')                     ),                     array(                         'id' => $  prefix . 'gallery-about-advisor',                         'type' => 'textarea',                         'name' => esc_html__('About Advisor', 'metabox-online-generator')                     )                 )             )         )     );      return $  meta_boxes; } add_filter( 'rwmb_meta_boxes', 'gallery_credit_section' ); 

Result:

Resultant image

As you can see, no name is there for the field, plus there is no textarea field too. Please help. Thanks 🙂

Get data from Active Directory when a field in custom list is changed in SharePoint 2013

I’m having a list with the following columns that have relation in the Active Directory: employee name, employee charge, department, extension number, employee’s boss, and other text columns.

I’m trying to do 2 different things:

  1. Get in the employee’s name column a list of employee from the Active Directoy, and with that selected employee name, automatically fill the fields charge, department, extension number, employee’s boss, with the data registered in the Active Directory.

Or

  1. Fill the column fields charge, department, extension number, employee’s boss using the “Created by” column, getting the information from the Active Directory of the user who is creating the ítem.

Thanks

i will design custom T-shirt in 5 hr for $5

Welcome to my T Shirt Design Gig! Designing your vision is my passion, it’s what I do best. I treat every project as a new and exciting challenge. I don’t do ‘off-the-shelf’ solutions, I approach each and every brief in a unique way; first, I’ll listen to your needs to really understand what you want to achieve, then I’ll design a T-shirt that targets your audience. For each order, you will get: 1 High-resolution PNG design (4500×5400 pixels / 300 DPI) with a transparent background that is perfect for printing. 1 JPEG digital T-shirt Mockup. 1 Editable Project Source File (EPS vector, PSD or PDF…) – please specify which file do you need. GIG EXTRAS (optional): 1 Day Delivery – 10$ Additional Mockup | T-shirt, sweatshirt, hoodie, baby shirt, hat, bag, mug… | – 5$ per conceptUnlimited Revisions – 10$ For more information please contact me.

by: lanamarii7
Created: —
Category: Art & Design
Viewed: 204


SharePoint Online – How to make custom forms launch in a dialog?

I’ve created a new custom edit form for a document library in SharePoint designer. “Launch forms in a dialog?” option in advanced settings is set to “yes”, however, it does not affect anything. The form always shows as page. Out-of-box Edit form for a customized document type always pops up as a dialog, however, all other forms, including out-of-box forms for customized link to a document and document set, always appear as page. Please help. Is there a way to specify page appearance on the page definition?

Update / refresh mini cart, after custom AJAX add_to_cart event

I need help

In my custom single-product.php template, I added the button

public function AddToCartButton() {     global $  product;      if($  product->is_type('variable') || $  product->get_stock_status() !== 'instock') {         $  disabled_btn_class = 'btn-am--disabled';     } else {         $  disabled_btn_class = '';     }      $  echo = '<form class="cart single-product-cart" method="post" action="woocommerce_ajax_add_to_cart" enctype="multipart/form-data">';     $  echo .= '<button type="submit" class="single_add_to_cart_button button alt btn-am btn-am--red '. $  disabled_btn_class .'" data-url="'. admin_url("admin-ajax.php").'"> ' . esc_html( $  product->single_add_to_cart_text() ) .'</button>';     $  echo .= '<input type="hidden" name="add-to-cart" value="'. absint( $  product->get_id() ) .'" />';     $  echo .= '<input type="hidden" name="product_id" value="'. absint( $  product->get_id() ) .'" />';     $  echo .= '<input type="hidden" name="quantity" value="1" />';     $  echo .= '<input type="hidden" name="variation_id" class="variation_id" value="0" />';     $  echo .= '</form>';      return $  echo; } 

Custom AJAX call

public function __construct() {     add_action('wp_ajax_woocommerce_ajax_add_to_cart', [$  this, 'ajax_add_to_cart']);     add_action('wp_ajax_nopriv_woocommerce_ajax_add_to_cart', [$  this, 'ajax_add_to_cart']); }  function ajax_add_to_cart() {     $  product_id         = apply_filters('woocommerce_add_to_cart_product_id', absint($  _POST['product_id']));     $  quantity           = empty($  _POST['quantity']) ? 1 : wc_stock_amount($  _POST['quantity']);     $  variation_id       = absint($  _POST['variation_id']);     $  passed_validation  = apply_filters('woocommerce_add_to_cart_validation', true, $  product_id, $  quantity);     $  product_status     = get_post_status($  product_id);      if ($  passed_validation && WC()->cart->add_to_cart($  product_id, $  quantity, $  variation_id) && 'publish' === $  product_status) {          do_action('woocommerce_ajax_added_to_cart', $  product_id);          if ('yes' === get_option('woocommerce_cart_redirect_after_add')) {             wc_add_to_cart_message(array($  product_id => $  quantity), true);         }      } else {          $  data = array(             'error' => true,             'product_url' => apply_filters('woocommerce_cart_redirect_after_error', get_permalink($  product_id), $  product_id));          echo wp_send_json($  data);     }      wp_die(); } 

This code works, and if refresh page, item added to cart, but this not work with hook woocommerce_add_to_cart_fragments

And in my functions.php I have this code for refresh update cart

add_filter( 'woocommerce_add_to_cart_fragments', 'wc_mini_cart_ajax_refresh' ); function wc_mini_cart_ajax_refresh( $  fragments ) { $  fragments['#mcart-stotal'] = '<div id="mcart-stotal" class="mini-cart-footer__total">'.WC()->cart->get_cart_subtotal().'</div>'; ob_start(); echo '<div id="mcart-widget">'; woocommerce_mini_cart(); echo '</div>'; $  fragments['#mcart-widget'] = ob_get_clean();  return $  fragments; 

}

And this hook works fine, but not for my custom AJAX button, why this happen?

Design 5 Custom Banner Ads, Facebook Ads, Email Banners, Twitter Ads, YouTube Cover Art, Google Ads for $10

Hello! If you’re looking for: Banner Ads;Facebook Ads; Twitter Ads; Email Banners; Email Images; Google Ads; Youtube cover Art or thumbnails…. YOU’RE IN THE RIGHT PLACE! I have over 10 years experience in the digital marketing world, including work in the graphic design space when creating ads and banner images for clients. I will make make sure I encapsulate your brand voice to make sure your individuality in this very crowded world comes through. I also will ensure the images are unique, and remain consistent with your brand in terms of colour schemes and typography. I offer unlimited revisions for your banners until you are 100% satisfied. You can message me everything and anything- questions, queries or concerns- just ask! I’d be more than happy to help. Looking forward to working with you!

by: PerformElite
Created: —
Category: Banner Ads
Viewed: 205