[Skip to main content](#vessel-content)

#   Custom field Link - default values concatenated

##

- **[yanliom](/forum/user/45218-yanliom "View yanliom's Profile")**
- [![yanliom's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45218-yanliom "View yanliom's Profile") Topic Author
- [ Offline](/forum/user/45218-yanliom)

Less More

- Posts: 66
- Thank you received: 1
-
-

6 years 2 months ago [\#322811](#322811) by [yanliom](/forum/user/45218-yanliom "View yanliom's Profile")  *[Custom field Link - default values concatenated](/forum/35-orders-management/900559-custom-field-link-default-values-concatenated#322811 "-- url of the page with the problem -- :   www.seemybag.gr/  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.20  Hello,  I'm using default values for my link custom field. For the Url and for the Text.  When I edit the values of the custom field in the Order form the values for Text and Url are concatenated.  Example default values: -Text: &quot;Click here&quot; -Url: &quot;  example.com &quot;  Result: -Text: &quot;Click here:https://example.com&quot; -Url: &quot;Click here:https://example.com&quot;  See attached screenshots.  Yannis")* was created by *[yanliom](/forum/user/45218-yanliom "View yanliom's Profile")*

-- url of the page with the problem -- : [ www.seemybag.gr/](https://www.seemybag.gr/)
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20

Hello,

I'm using default values for my link custom field. For the Url and for the Text.

When I edit the values of the custom field in the Order form the values for Text and Url are concatenated.

Example default values:
-Text: "Click here"
-Url: "[ example.com](https://example.com)"

Result:
-Text: "Click here:https://example.com"
-Url: "Click here:https://example.com"

See attached screenshots.

Yannis  [ ![Capture1.PNG](/forum/attachment/50245) ](/forum/attachment/50245 "Capture1.PNG")

[ ![Capture2&#95;2020-08-07.PNG](/forum/attachment/50246) ](/forum/attachment/50246 "...2020-08-07.PNG")

- [ ![Capture1.PNG](/forum/attachment/50245) ](/forum/attachment/50245 "Capture1.PNG") [ ](/forum/attachment/50245?download=1 "Capture1.PNG")
- [ ![Capture2&#95;2020-08-07.PNG](/forum/attachment/50246) ](/forum/attachment/50246 "...2020-08-07.PNG") [ ](/forum/attachment/50246?download=1 "...2020-08-07.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMDU1OS1jdXN0b20tZmllbGQtbGluay1kZWZhdWx0LXZhbHVlcy1jb25jYXRlbmF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

6 years 2 months ago [\#322813](#322813) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field Link - default values concatenated](/forum/35-orders-management/900559-custom-field-link-default-values-concatenated#322813 "-- url of the page with the problem -- :   www.seemybag.gr/  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.20  Hello,  I'm using default values for my link custom field. For the Url and for the Text.  When I edit the values of the custom field in the Order form the values for Text and Url are concatenated.  Example default values: -Text: &quot;Click here&quot; -Url: &quot;  example.com &quot;  Result: -Text: &quot;Click here:https://example.com&quot; -Url: &quot;Click here:https://example.com&quot;  See attached screenshots.  Yannis")*

Hi,

Try adding the code: Code:

if(strlen(trim($value)) &lt; 1 &amp;&amp; !empty($field-&gt;field_default)) $value = $field-&gt;field_default;

before the line: Code:

if(preg_match('#(?:"?([^"]+)"?:)?(https?:\/\/.*)#i', $value, $m)) {

in the file administrator/components/com_hikashop/classes/field.php and that should fix the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMDU1OS1jdXN0b20tZmllbGQtbGluay1kZWZhdWx0LXZhbHVlcy1jb25jYXRlbmF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.083 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
