Difference between two dates in field group

3 weeks 5 days ago #320650 by ericmuc
Hi,
I need following:
Startdate - Enddate (Duration in years, months)

I have two cases
1) startdate - up to now (Duration in years, months)
2) startdate - enddate (Duration in years, months)

This both cases occur in a field group.

Can you give me sample, so that I can implement this? I found many suggestions in the internet, but need to know the best sample for cb joomla.

And further on I don't know how to handle that within a field group.

Thanks a lot, best regards
Eric

Please Log in to join the conversation.

3 weeks 4 days ago #320657 by krileon
Replied by krileon on topic Difference between two dates in field group
Use the parameters under Display to control the display of field groups. Specifically the "Custom Display Rows" parameter. It even supports template based output and custom templating if you'd prefer to style the display using a template. Both profile display and edit display can be changed in that tab. Please be sure to read parameter descriptions carefully as it explains how to properly substitute in those fields.

If you're trying to substitute those fields outside of the field group it gets a bit more tricky, but is doable. See the below on how to do this.

www.joomlapolis.com/forum/153-professional-member-support/242183-accessing-the-individual-fields-within-a-field-group#316989


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 weeks 4 days ago #320660 by ericmuc
Replied by ericmuc on topic Difference between two dates in field group
Hi,
Thanks, I am working already with the Custom Display Rows, but can I make substractions with two fields and date format in that output?
Best regards
Eric

Please Log in to join the conversation.

3 weeks 4 days ago #320663 by krileon
Replied by krileon on topic Difference between two dates in field group
Ah, thought you wanted to just display them side by side. Sorry, misunderstood what you're asking. Believe only way you can do that is use a code field inside your field groups field then handle the math operations there. The substitutions for those fields values (e.g. [cb_startdate]) should work fine as long as the code field is inside of the field group field. You'll need to write the necessary PHP to handle your math operations though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 weeks 4 days ago - 3 weeks 4 days ago #320670 by ericmuc
Replied by ericmuc on topic Difference between two dates in field group
Hi,
Thanks, ok, I will do this.

Further question to the topic "Custom Display Rows" of this thread:

I have 2 fields:
1) Company Name
2) Company URL

I want to have the output: <a href="company_url">Company Name</a>

I tried some code but it don't works.

What I have to use to achieve this in "Custom Display Rows"?

Thanks, best regards
Eric

Please Log in to join the conversation.

3 weeks 4 days ago #320671 by ericmuc
Replied by ericmuc on topic Difference between two dates in field group
Solved with:
<a href="[cb:userdata field="cb_cv_company_url" /]" target="_blank">[value]</a>
in the output field of the company field

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.439 seconds

Facebook Twitter LinkedIn