Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cmb2-conditional-logic
Advanced tools
Readme
A small jQuery plugin for handling conditional logic fields for CMB2.
I used to use cmb2-conditionals pluing but since it doesn't work properly on Group fields and not updated for 2 years, I decided to create a new one. The plugin currently supports checkboxes, radios and select lists.
CMB2-conditional-logic.js
file in your project using admin_enqueue_scriptsattributes
parameters: data-conditional-id
which should match the conditional feild ID and data-conditional-value
which should match the conditional valueattributes
parameter:data-conditional-id
which should match the conditional feild ID.data-conditional-value
which should match the conditional value. $cmb_demo->add_field( array(
'name' => __( 'Conditional select test:', 'your-text-domain' ),
'desc' => __('some description', 'your-text-domain'),
'id' => 'test_select_id',
'type' => 'select',
'options' => array(
'one' => __('one', 'your-text-domain' ),
'two' => __('two', 'your-text-domain'),
'three' => __('three', 'your-text-domain'),
),
) );
// conditional field
$cmb_demo->add_field(array(
'name' => __( 'Will show on value two selected', 'your-text-domain' ),
'desc' => __('some description', 'your-text-domain'),
'id' => 'test_select_depend',
'type' => 'select',
'options' => array(
'four' => __('Four', 'your-text-domain'),
'five' => __('Five', 'your-text-domain'),
'six' => __('Six', 'your-text-domain'),
),
'attributes' => array(
'data-conditional-id' => 'test_select_id',
'data-conditional-value' => 'two',
),
) );
data-conditional-value
using php wp_json_encode( array( 'value 1', 'value 2' ) )
like so: 'attributes' => array(
'data-conditional-id' => 'test_select_id',
'data-conditional-value' => wp_json_encode( array( 'two', 'three' ) ),
),
FAQs
A small jQuery plugin for handling conditional logic fields for CMB2.
The npm package cmb2-conditional-logic receives a total of 1 weekly downloads. As such, cmb2-conditional-logic popularity was classified as not popular.
We found that cmb2-conditional-logic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.