Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Intro Black Friday Offer for a lifetime*

[SOLVED] Passing Field Value from profile to custom page

  • maleman
  • maleman
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
10 years 7 months ago - 10 years 7 months ago #243530 by maleman
I am trying to pass a custom field called cb_company to a custom page but I cannot seem to come up with a workable solution. So far, I have been able to pass static text by creating a field in the comprofiler table with the type of delimiter. In the description field, I created a link that the visitor would click on and the URL has the static parameter coded in.

What would be nice is to pass the cb_company value via a parameter.

I also have tried to create a form field (i.e. button) that once it is clicked, it launches a php script. This approach will not "pass" the field value because the cp_company is not a form field.

Any help would be greatly appreciated!
Thanks!
Last edit: 10 years 7 months ago by nant.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 7 months ago #243557 by nant

maleman wrote: I am trying to pass a custom field called cb_company to a custom page but I cannot seem to come up with a workable solution. So far, I have been able to pass static text by creating a field in the comprofiler table with the type of delimiter. In the description field, I created a link that the visitor would click on and the URL has the static parameter coded in.

What would be nice is to pass the cb_company value via a parameter.

I also have tried to create a form field (i.e. button) that once it is clicked, it launches a php script. This approach will not "pass" the field value because the cp_company is not a form field.

Any help would be greatly appreciated!
Thanks!


You can pass value in URL in the delimiter field.

something like

<a href=" www.mysite.com/myscript.php?company= [cb_company]">click here to pass company to external script</a>

Please Log in or Create an account to join the conversation.

  • maleman
  • maleman
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
10 years 7 months ago #243606 by maleman
Thanks for your quick reply! However, I cannot seem to get it to work. Here is how I have the delimiter field coded (description area):

<p><a href="index.php?option=com_fabrik&amp;view=form&amp;fabrik=2&amp;random=0&amp;Itemid=78;&amp;Test=test;&amp;Company=[jos_comprofiler___company]">Like Us!</a></p>

Here is what the URL looks like once the link is clicked:

www.mysite.com/dev2/bakfc/index.php?option=com_fabrik&view=form&fabrik=2&random=0&Itemid=78;&Test=test;&Company= [jos_comprofiler___company]

As you can see it is inserting the literals instead of substituting the value.

Thanks for your help!

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 7 months ago #243613 by nant

maleman wrote: Thanks for your quick reply! However, I cannot seem to get it to work. Here is how I have the delimiter field coded (description area):

<p><a href="index.php?option=com_fabrik&amp;view=form&amp;fabrik=2&amp;random=0&amp;Itemid=78;&amp;Test=test;&amp;Company=[jos_comprofiler___company]">Like Us!</a></p>

Here is what the URL looks like once the link is clicked:

www.mysite.com/dev2/bakfc/index.php?option=com_fabrik&view=form&fabrik=2&random=0&Itemid=78;&Test=test;&Company= [jos_comprofiler___company]

As you can see it is inserting the literals instead of substituting the value.

Thanks for your help!


I am wondering what you read that would imply this usage:

Company=[jos_comprofiler___company]

please study our tutorials section.

If your CB field is named cb_company then the substitution you need is [cb_company]

There is no need to reference any database table names.

Please Log in or Create an account to join the conversation.

  • maleman
  • maleman
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
10 years 7 months ago #243630 by maleman
It works now. Thanks.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum