
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
lr-dynamic-forms
Advanced tools
The Liferay Clay Form Generator is a dynamic form generator built for Liferay applications. It allows developers to define form schemas and automatically generate forms with validation, layout, and a variety of input controls.
To install the Liferay Clay Form Generator, run:
npm install lr-dynamic-forms
import React, { useRef } from 'react';
import { LRDynamicForm, LRDynamicFormRef } from 'liferay-clay-form-generator';
const formSchema = {
properties: {
username: {
name: 'username',
title: 'Username',
controlType: 'input',
dataType: 'text',
validators: [{ type: 'required', message: 'Username is required' }]
},
password: {
name: 'password',
title: 'Password',
controlType: 'input',
dataType: 'text',
validators: [{ type: 'required', message: 'Password is required' }]
}
}
};
const MyFormComponent = () => {
const formRef = useRef<LRDynamicFormRef>(null);
const handleSubmit = () => {
if (formRef.current) {
formRef.current.handleFormSubmit();
}
};
return (
<div>
<LRDynamicForm schema={formSchema} ref={formRef} />
<button onClick={handleSubmit}>Submit</button>
</div>
);
};
export default MyFormComponent;
export interface FormField {
name: string;
title: string;
controlType: 'select' | 'checkbox' | 'toggle' | 'radio' | 'toggle-group' | 'date' | 'file' | 'input' | 'slider' | 'textarea';
dataType: 'text' | 'boolean' | 'number' | 'object';
format?: string;
default?: any;
enum?: any[];
config?: any;
tooltipPosition?: "top" | "bottom";
[key: string]: any;
}
export interface Sizes {
lg: number;
md: number;
sm: number;
xs: number;
}
export interface LayoutItem {
type: 'row' | 'col';
sizes?: Sizes;
field: string;
items?: LayoutItem[];
}
export interface FormSchema {
properties: {
[key: string]: FormField;
};
layout?: LayoutItem[];
validation?: FieldValidation[];
}
export interface Validator {
type: 'required' | 'pattern';
pattern?: string;
message?: string;
}
export interface FieldValidation {
field: string;
validators: Validator[];
}
export interface LRDynamicFormProps {
schema: any;
}
export interface LRDynamicFormRef {
handleFormSubmit: () => void;
handleFormReset: () => void;
handleFormValidation: () => Promise<boolean>;
}
Contributions are welcome! Please open an issue or submit a pull request for any bugs or features.
This project is licensed under the MIT License.
FAQs
## Introduction
We found that lr-dynamic-forms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.