• Resolved leoland

    (@leoland)


    Update, works for now, looking for better solution.

    I am having users pass a url trough a text field, then it is outputted this way:
    echo'<a href="https://' . $vendor['vendor_link'] . '">';
    This works unless they include https:// in the field.
    How would i filter it out ? or is there a cleaner solution?

    If i remove the http from my echo, then it passes the link as a subpage of the page the code is in.

    So this works for now, but i am unsure if it is the best solution.

    $strip_these = array("https://", "https://");
    echo'<a href="https://' . str_replace($strip_these, "", $vendor['vendor_link']) . '">';

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    2.4 was just released, which includes a Hyperlink field type.

    Thread Starter leoland

    (@leoland)

    Ah, I am using the link to enclose a bunch of other content so this works for now but i am definitely playing with the new field. that would explain why the the url addon (i thought I had imagined it) disappeared.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Url Field’ is closed to new replies.