is there any way I can automatically verify that the text inserted is a correct URL format like http://google.com ?
I know I could use URL field instead, but I am building a "bookmarks" section and URL field is not the best choiche for now, I am building it manually witha custom template using separate text fields for "website name" and "website url"
then using "composite title" type parameter and a custom list template to
make "website title" text field as the record title, linked directly to the website URL
the code to achieve this is something like this
<h2>
<a rel="nofollow" target="blank" title="<?php echo $item->title?>" href="/<?php echo $item->fields_by_id[34]->result; ?>">
<?php echo $item->title?>
</a>
<?php echo CEventsHelper::showNum('record', $item->id);?>
</h2>
were title?>
is the "website name" text field output
and fields_by_id[34]->result; ?>
is "website URL" text field output
is there any way I can automatically verify that the text inserted is a correct URL format like http://google.com ?
I know I could use URL field instead, but I am building a "bookmarks" section and URL field is not the best choiche for now, I am building it manually witha custom template using separate text fields for "website name" and "website url"
then using "composite title" type parameter and a custom list template to
make "website title" text field as the record title, linked directly to the website URL
the code to achieve this is something like this
were title?>
is the "website name" text field output
and fields_by_id[34]->result; ?>
is "website URL" text field output