Smart Number Field
Overview
Description
The Smart Number Field is an ExpressionEngine field type add-on that allows users to get the numbers. It receives the text input field with only numbers and doesn’t allow any characters. The Smart Number Field module is also compatible with third-party add-ons.
Plugin's purpose and benefits
- Easy Setup & Installation - Quick configuration process with minimal steps required.
- User-Friendly - Intuitive to use, even for non-technical users.
- Grid Field Compatibility - Works perfectly with complex grid layouts, ensuring smooth data management.
- Fluid Field Compatibility - Fully supports Fluid fields, making flexible content structures easier to manage.
- Relationship Field Compatibility - Maintains strong support for relationships between entries, ensuring data integrity and connections are preserved.
- Channel Forms Support - Allows smooth integration with Channel Forms, enhancing front-end data submission.
- Improved Workflow - Saves time and effort for both developers and content editors.
- Enhanced Flexibility - Adapts to multiple field types and workflows without requiring additional plugins or custom code.
Get Started
Quick setup instructions
How To Use & Features
Create/Edit Field
Follow the steps below to create a new Smart Number Field:
- Go to the field manager and click on “New Field”
- Select Smart Number Field type in the input type box. You will find field options for this field type at the bottom.
There is few field options in the backend of the smart number field:
- Float Value
- Number Format
- Default Value
- Placeholder Text
- Prepend
- Append
- Minimum Value
- Maximum Value
- Step Size
Float Value
- First,field options consist of float values that are in the form of switch cases (yes/no).
- This option shows the value of any number/price in the float format in the frontend.
- The maximum and minimum value will show in the float format in the back-end field option when enabled.
Number Format
- This field option is also in the form of a switch case (yes/no).
- If you enable the switch, it shows the number format’s value with a comma(,) as the thousand separators in the frontend.
Default Value
- This field option is to work to get the default value.
- If you put the value in the default text input type and there will be no value of data in the channel entries.
Placeholder Text
- This field option is to work in the back-end only.
- If you place any message in a placeholder in the field options of the text input.
- These messages will appear in the channel entries input field type as a placeholder.
Prepend
- This input type field option works to take any symbol to show the price/number’s presiding.
- It will then show the price in the frontend with its symbol added in the back-end prepend field options.
Append
- The append field option works to show value in the post side with its price/number value. This value will show in the frontend.
Minimum Value
- The minimum value field option is to work in the back-end only. Suppose we put the minimum value in the input field. It will only take the values according to the minimum value shown in the input entries. If the minimum limit extends, it will show validation errors. The minimum value takes numbers only. No characters are allowed. It also allows negative value.
Maximum Value
- The maximum value field option is to work in the back-end only. Suppose you put the maximum value in the input field options. It will only take the value according to the maximum value from the back-end. If the maximum limit extends, it will show validation errors. Maximum value takes number only, no characters are allowed. It also allows negative value.
Step Size
- Step size field option works in the back-end only. This field option works to show according to the value given in step size. It takes value in channel entries as per the given step size in it.
- If the minimum value and step size both value in field options, it will take the value in channel entries according to step size and minimum value.
Channel Entry page
Create/Edit channel entry
This is how the fields will look like in the channel entry pages.
Image - 3Fieldtype
Normal field example
{exp:channel:entries} {title} {url_title} {smart_number} {/exp:channel:entries}
Example with GRID
{exp:channel:entries} {number_grid} {number_grid:snf_normal_field wrap_tag="h3"} {number_grid:snf_normal_field prepend_tag="h6"} {number_grid:snf_normal_field append_tag="h2"} {number_grid:snf_normal_field append_first="y"} {/number_grid} {/exp:channel:entries}
Example with Fluid Field
{exp:channel:entries} {fluid_field} {fluid_field:snf_normal_field} {content wrap_tag="h3"} {content prepend_tag="h6"} {content append_tag="h2"} {content append_first="y"} {/fluid_field:snf_normal_field} {/fluid_field} {/exp:channel:entries}
Front-end Tags
Smart number field front-end tags are just like to use channel entries tag. We have introduced new tags in field tags that will allow us to filter the output in the frontend.
- wrap_tag
- prepend_tag
- append_tag
- Append_first
wrap_tag
wrap_tag is used to wrap the data or content in the particular HTML tag(h1,h2… h6,span,p,b and so on) with the smart number field.
Example:
{snf_number wrap_tag="h3"}
prepend_tag
prepend_tag is used to get the prepend value data in the particular HTML tag(h1,h2…h6,span,p,b and so on) format with the smart number field.
Example:
{snf number prepend tag="h6"}
Append_tag
append_tag is used to get the append value data in the particular HTML tag(h1,h2… h6,span,p,b and so on) format with the smart number field.
Example:
{snf_number append_tag="h2"}
append_first
append_first tag is used to get the append tag value in the preside of the data with the condition (”Yes” or “y”) . If user don’t want this condition they can usually put no condition (”No” or “n”)
Example:
{snf_number append_first="y"}
Get Support
FAQs
Change log
version 1.0.4
- Compatibility of PHP Version 8.2
version 1.0.3
- Fixed MariaDB column length issue.
version 1.0.2
- Resolve divider issue
version 1.0.1
- Moved from License logic to Subscription
version 1.0.0
- Initial Version