1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Radiobutton, change of state after 12 hours, 24 hours and.....

Discussion in 'Community' started by giusebos, Dec 29, 2018.

  1. giusebos

    giusebos Member

    Level: Community
    Hi everyone,
    I have a table with the datetime field that records the time when the record was created

    in the table I have 4 choices (radiobutton):
    24h,
    48h,
    7 days
    15days

    I would like to have a field, where at the expiration of 50% of the time there is written "is about to expire"

    I would like to have a field, where at the end of 100% of time there is written "expired"

    I hope in your help
    happy 2019
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
  3. giusebos

    giusebos Member

    Level: Community
    unfortunately I do not know anything about PHP and I do not know how to start.
    I thought I would solve with the cal plug-in, adding the minutes to the given field,
    when the difference between input time and current time is greater than 720 minutes (12h) for example:

    27-12-2018 15:03 + 720minutes

    I was thinking of inserting a field that would dynamically fill up when conditions occur
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
  5. giusebos

    giusebos Member

    Level: Community
    Ok, to start to understand something, I entered this code:

    PHP:
    $nowdate = strtotime("{table___element}");
    $thendate = strtotime("today");
    $datediff = ($thendate - $nowdate);
    $diff = round($datediff / 86400);
    return $diff;
    I get strange numbers that I do not understand
    I would like to have this result:
    1 day, 3 hours and 10 minutes

    the difference in dates I need to generate a visual all-time in 2 times
    in this regard I want to attach an explanatory image
    I should add to this mechanism sending emails 50% of the time and 100% of the time

    I also add that I would like to pay for the help offered, I opened a request for paid help, but I have not yet received a reply.

    thank you istruzioni-1.jpg
     
  6. giusebos

    giusebos Member

    Level: Community
    I sent a request for paid support, I hope in a quick response
     
  7. mediaateam

    mediaateam Super Moderator Staff Member

    Level: Community
    @giusebos - I sent you an email today, awaiting your response. Thanks!
     

Share This Page