About
Pricing
Community
Teams
Start Free Trial
Log in
Hamdan Shafiq
asked on
11/3/2017
Anyone can help me to change the following tpl code into twig code ???
<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $entry_allowed_domestic_me
thods; ?></label>
<div class="col-sm-4">
<div class="well well-sm" style="height: 150px; overflow: auto;">
<?php foreach ($allowed_domestic_methods
as $key=>$dservice) { ?>
<div class="checkbox">
<label>
<?php if (in_array($dservice['value
'], $aramex_allowed_domestic_m
ethods)) { ?>
<input type="checkbox" name="aramex_allowed_domes
tic_method
s[]" value="<?php echo $dservice['value']; ?>" checked="checked" />
<?php echo $dservice['label']; ?>
<?php } else { ?>
<input type="checkbox" name="aramex_allowed_domes
tic_method
s[]" value="<?php echo $dservice['value']; ?>" />
<?php echo $dservice['label']; ?>
<?php } ?>
</label>
</div>
<?php } ?>
</div>
* Twig
PHP
3
1
Last Comment
Hamdan Shafiq
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Leonidas Dosas
11/4/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Hamdan Shafiq
11/4/2017
ASKER
thanks for Leonidas Dosas nice solution.
Hamdan Shafiq
11/4/2017
ASKER
plz check the line.
{% if dservice.value in shipping_aramex_allowed_do
mestic_met
hods %}
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes