This tutorial covers all the major features of the DBP Edit Programs block.
The DBP Edit Programs block is a powerful Gutenberg block that allows logged-in users to edit their affiliate program IDs through a fully customizable form interface. This comprehensive tutorial will guide you through all its features and capabilities.
Getting Started
Adding the Block
- In the WordPress editor, click the “+” button to add a new block
- Search for “DBP Edit Programs” or find it in the Widgets category
- Click to add the block to your post or page
Initial Setup
Important: This block only appears to logged-in users. Visitors who aren’t logged in will see a message asking them to log in. Configure your affiliate programs in DBP settings before using this block.
Core Settings
Form Content Settings Panel
Button Text
- Purpose: Text displayed on the save button
- Default: “Save Changes”
- Examples: “Update Settings”, “Save Programs”, “Apply Changes”
Form Layout Settings Panel
Form Width
- Purpose: Controls the width of the entire form
- Default: 100%
- Options: 100%, 80%, 60%, 400px, auto
- Use Case: Create narrow forms for sidebars or wide forms for full-width sections
Form Alignment
- Purpose: Controls horizontal alignment of the form
- Default: Center
- Options: Left, Center, Right
- Use Case: Align forms to match your page design
Styling Options
Container Styling Panel
Background & Border
- Background Color: Set container background color
- Text Color: Set container text color
- Border Color: Add border color to container
- Border Width: Set border thickness (0-10px)
- Border Radius: Round corners (0-50px)
- Padding: Internal spacing (0-50px)
Input Field Styling Panel
Input Field Colors
- Background Color: Input field background (default: #ffffff)
- Text Color: Input text color (default: #333333)
- Border Color: Input border color (default: #dddddd)
Input Field Spacing
- Border Width: Input border thickness (default: 1px)
- Border Radius: Input corner roundness (default: 4px)
- Padding: Internal spacing (Top/Right/Bottom/Left)
- Margin: External spacing (Top/Bottom)
- Width: Input field width (default: 100%)
- Font Size: Input text size (default: 16px)
Button Styling Panel
Button Colors & Effects
- Background Color: Button background (default: #007cba)
- Text Color: Button text color (default: #ffffff)
- Border Color: Button border color
- Gradient: Enable gradient backgrounds for modern look
Button Dimensions
- Width: Button width (auto, 100%, custom)
- Padding: Button internal spacing (Top/Right/Bottom/Left)
- Margin: Button external spacing (Top/Bottom)
- Border Width: Button border thickness
- Border Radius: Button corner roundness
- Font Size: Button text size (default: 16px)
- Font Weight: Button text weight (normal, bold)
Label & Message Styling Panel
Label Styling
- Label Color: Color of field labels (default: #333333)
- Label Font Size: Size of field labels (default: 16px)
- Label Margin: Spacing below labels (default: 5px)
Success Message Styling
- Success Color: Color of success messages (default: #4caf50)
- Success Font Size: Size of success messages (default: 16px)
- Purpose: Shown when users successfully save their changes
Examples
Basic Edit Programs Form
Configuration:
- Default styling with standard colors
- 100% width with center alignment
- Button text: “Save Changes”
Use Case: Quick setup for member areas where users need to manage their affiliate program IDs.
Styled Edit Programs Form
Configuration:
- Container: Light blue background, rounded corners
- Form width: 600px, center aligned
- Input fields: Custom padding, professional styling
- Button: Gradient background, custom text
- Labels: Larger font, custom colors
Use Case: Professional member dashboard with branded styling that matches your site design.
Compact Sidebar Form
Configuration:
- Form width: 100% (fits sidebar)
- Compact padding and margins
- Smaller font sizes for inputs and labels
- Full-width button
- Minimal border and simple colors
Use Case: Widget areas or sidebar placements where space is limited.
Best Practices
User Experience Tips
- Clear Labeling: Program names should be descriptive and recognizable
- Success Feedback: Style success messages prominently so users know their changes were saved
- Accessible Colors: Ensure sufficient contrast between text and background colors
- Mobile Responsive: Test form width and spacing on mobile devices
- Form Width: Use reasonable widths (300-600px) for better readability
Security Considerations
- User Authentication: Form only appears to logged-in users
- Data Validation: All input is sanitized before saving
- User Verification: Users can only edit their own program IDs
- Safe Placement: Place on member-only pages or protected areas
Performance Tips
- Conditional Loading: Styles only load when block is present
- Lightweight Form: Minimal JavaScript, server-side processing
- Caching Friendly: Form updates don’t break page caching
Troubleshooting
Common Issues
Form Not Appearing:
- Check if user is logged in (form only shows to logged-in users)
- Verify affiliate programs are configured in DBP settings
- Check for JavaScript errors in browser console
Styling Issues:
- Clear browser cache after making style changes
- Check for theme CSS conflicts
- Verify color values are valid hex codes
- Test on different devices and browsers
Form Submission Problems:
- Check for server-side errors in WordPress debug log
- Verify user has proper permissions
- Test with different affiliate program names
- Check if success message appears after submission
Advanced Customization
For advanced users who need custom styling beyond the block options:
- Use CSS classes:
.wp-block-downline-builder-plugin-edit-programs - Target specific elements:
.dbp-edit-programs-form - Style individual programs:
.dbp-program - Customize success messages:
.dbp-success
Add custom CSS to your theme’s style.css or through the WordPress Customizer for advanced styling needs.
