File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
/home/pharmacy/public_html/wp-content/plugins/ninja-forms/src/components/displayActionSettings.js
import PropTypes from 'prop-types';

export const DisplayActionSettings = ( props ) => {
	const values = Object.keys( props.value ).map( ( key ) => {
		//Only Display these settings
		const inValues = [ 'label', 'to', 'email_subject' ];
		if (
			inValues.includes( key ) &&
			typeof props.value[ key ] === 'string' &&
			props.value[ key ].length > 0
		) {
			return (
				<li key={ key }>
					<b>{ key }</b>: { props.value[ key ] }
				</li>
			);
		}
	} );

	return <ul>{ values }</ul>;
};

DisplayActionSettings.propTypes = {
	value: PropTypes.object.isRequired
}