Display a link for each checkbox label

mirceat

Member
Hello,

I need to display a link to a form for each checkbox label available for a specific cascading dropdown element. I tried to modify the $opt->text value, but instead of creating a link, the href tag is displayed near each checkbox label.

I was thinking to modify the template, but unfortunately, i don't know how to do this. The link displayed for each checkbox should get some previous selected values (it's a chain CDD).

If anyone can give me a hint..

Thank you
 
Bumping doesn't really work in Community. If you really need an answer ... tossing a couple of bucks our way and getting a Standard sub is the best way to go. For just pennies a day, you can feed a starving Fabrik developer.

-- hugh
 
I remember that i paid few bucks few months ago for solving a bug and after several days i get the answer "no, it can't be done" I'm not sure i want to repeat this experience, this request is because i didn't get a solution to that problem and i'm looking for a workaround :)
 
Which bug was that?

The deal is, some bugs / issues can't be fixed, but we still have to expend time working that out. It's kind of like having a car with an issue, you take it to a mechanic, try and get it fixed, sometimes it can be fixed, sometimes it can't, but the mechanic still has to spend time working on it to establish that, and you don't expect a mechanic to work for free. Yet a lot of people expect us to work entirely for free fixing bugs, because "it's a bug". Well yeah - there's about a third of a million lines of code we have to maintain in Fabrik (including the third party libs we use), and research shows that any program with more than 12 lines most likely has at least one bug. So yeah, there's going to be bugs. And if we were expected to fix all bugs for free because "bug", Fabrik wouldn't exist.

Fabrik is open source, which means it's free for you to use, "as-is", and do what you want with. But that doesn't mean we can develop, support and bug fix it entirely for free. We have to pay our rent and put food on the table somehow. So the continued existence of Fabrik relies on people who use it, contributing something towards the development. When it comes to fixing bugs, most of the time we can fix things, and we always do our best. Sometimes we can't. Which is disappointing for everyone, but a fact of life when it comes to large, complex pieces of software.

And all I'm saying is, if you are at the point of bumping Community threads, then tossing $20 our way to do our best to help you out doesn't seem entirely unfair.

-- hugh
 
Hugh, i don't mind to pay 20$, in fact if you remember, i've asked you for a price quote (for which i was willing to pay way more than 20$), just to find a solution, so i didn't asked to solve that problem "for free". I know that you have to "put some food on the table", but i also need to know that i'll get a proper answer/solution in a proper time range.

Long story short, i'll pay for Fabrik support in hope that you or other developer can help me with those two requests posted in this forum.

Thank you
 
Speaking of subscription, please check the following issue within the subscription area. I am logged in and i want to subscribe to "Standard" support, i can't because "Password confirmation does not match". The form contain only one (read-only) password field.
Clipboard01.jpg Clipboard02.jpg
 
Hmmm, thought we'd fixed that, I'll go check. We upgraded on Friday, and some stuff has gone wobbly.

My apologies, I really didn't mean to go off like that. I've just had a frustrating few days, with more than the average number of people mailing / PM'ing me for free support (abut 20 in the last 48 hours) and some of them getting really quite obnoxious when I explain that I can't provide free support on a free product. I get that a couple of them really can't afford even a standard sub, but others are working on complex, high dollar apps for good paying clients, who simply expect "bugs" (everything is always a "bug", even if it's pilot error!) to get fixed for free, and how dare I suggest they contribute to supporting the product they use to implement those apps with.

Anyway ... you've been a customer for a long time, we appreciate you sticking around, and I apologize for my little rant.

-- hugh
 
No need to apologize, everyone has a bad day :) The subscription was paid now, please let me know if you want me to repost the latest two requests from the Community forum into the Standard forum.
 
What are your CDD settings (render as checkbox list?)?
Where do you want to see the link?

CDD checkbox +$opt->text with a link is working on my site in form and details view (but not in list view).
 
yes, the CDD is a checkbox list, i need to display the link near each label in order to open an external php page. The link should contain the values from the previous selections.

Can you show me an example about how to display the link? I can't make the link text clickable, it displaying the href tag.
 
I only tested with static text but this shouldn't matter.
Code:
$t= $opt->text;
$mylink = 'http://mylink.ch';
$mylinktext = 'some text';
$opt->text ='<a href="' . $mylink . '">' . $mylinktext .'</a>';

Moved this thread to standard
 
Same problem with your code, the html tag is visible. i'm thinking that this might be a local issue, but i don't see any error in the developer console. Btw, having this link will tick the checkbox when is clicked or it will just popup the page?

Also, using your example there is no label for the checkboxes..it's also a local issue or this should happen when i add the $opt->text?

The row for each checkbox should look like: "Checkbox Label" | "Modify". Clicking on "Modify" should open a new page.
Clipboard01.jpg
 
Works for me ... in my test, the original CDD checkbox label is a city name, in upper case. So I'm appending a URL to example.com/city_name, lower cased.

http://screencast.com/t/1gA8p9JFc

As you can see, it comes out as a clickable link, opening a new tab, without selecting the checkbox. i didn't show it in the video, but if you click on the checkbox, it selects as normal.

Can you paste your exact code here?

-- hugh
 
I tried with your code and also the code from troester (on two different websites), same problem, see attached image:

Code:
$opt->text .= '<a target="_blank" href="http://www.google.com'. strtolower($opt->text) .'">Modifica</a>';
 

Attachments

  • Clipboard02.jpg
    Clipboard02.jpg
    37.4 KB · Views: 362
I can't replicate your issue.
If I copy/paste exactly your code
Code:
$opt->text .= '<a target="_blank" href="http://www.google.com/'. strtolower($opt->text) .'">Modifica</a>';
with just a / after google.com (because without it doesn't make any sense) it's working on my site.
Fabrik 3.3.1 + the CDD plugin from Github
Not sure what you are doing here, but you should always do a complete GitHub update (cherrypicking may create issues with different versions, dependencies...)
 
forward slash added, github update: done, refresh cache: done..same problem :( Do you want/have acces to test this on my site?
 
Confirmed.
It's only with the 2nd CDD (ie a CDD watching a CDD), the label is surrounded by <span> and HTML-encoded.
But I don't know where this is done.
 
The problem has been solved in the latest github version, thank you, Rob.

Now i need to find how to get the value of each checkbox ticked for this CDD element, in order to create a link using all the existing elements in form, like: index.php?dbjoin_element1=value1&CDD_element=value2 etc..
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top