
The Website field can store a URL or Website Address or Link to a Website.
Contents
Quick Start
- Fill out the Basic Field Settings (Label, Description, and Field Name)
- Select Field Type: Website.
- Click Save New Field (or Save Field if you’re updating an existing field) to save your field configuration.
Settings
- Format
The Format options provide a validation for your field to ensure values will be saved/displayed as you expect them to be. You will be presented with a drop-down list of multiple options, including thehttps://in the front of your field, removing thewwwor adding thewwwor multiple combinations therein. Choose the one that most fits what you need or chooseNo Formatto have no input mask at all. The options are:- https://example.com/
- https://example.com/ (remove www)
- https://www.example.com/ (force www if no sub-domain provided)
- example.com
- example.com (force removal of www)
- www.example.com (force www if no sub-domain provided)
- No format
- Allow port in URL
When enabled, you will allow the port to be included in potential URLs, such as https://myexample.com:8080 where the “:8080” is the port. This is not common for URLs but it may be necessary to support in certain circumstances. - Output as a link
When rendering this field, it will automatically link the URL text. When disabled, only text will be displayed.- Open link in new window
When rendering this field with a link, you can choose to open the link in a new window when someone clicks it. Pods always usestarget="_blank" rel="noopener noreferrer"to support this functionality.
- Open link in new window
- Enable HTML5 Input Field
When enabled, this will render the field withtype="url"using the default browser interface. Based on your needs, the browser interface may be a better experience especially for mobile devices. For more details on HTML5 types, you can read the documentation at W3 on Validating Common Input. - Maximum Length
The maximum length of text to allow (default: 255), you can set it to -1 to disable the limit. - HTML Placeholder
This is the text that will show on the input field when it is empty to help guide content entry. The placeholder is not a replacement for labels or description text, and it is less accessible for people using screen readers. For more details on the usage of Placeholder Text, you can read the documentation at W3 on Placeholders.
How to Display
Display with a Shortcode
[pods field="my_website_field"]
Display with PHP: pods_field_display()
<?php echo pods_field_display( 'my_website_field' );
Display with PHP: $pod->display()
<?php $pod = pods(); echo $pod->display( 'my_website_field' );