Re: Link to open form not showing
Posted: 10 Feb 2023, 00:46
I solved it my way even a little less complex, I modified the "default_form_classic.php" file in "components\com_phocaguestbook\views\guestbook\tmpl\"
and I added right after
if ($this->params->get('show_form') == 1) : ?>
this code:
<div class="card-sm bg-light" >
<div class="card">
<div class="card-body ">
<div class="row">
<div class="col-md-4"><?php echo "Your opinion matters"; ?></div>
</div>
</div>
</div>
<br>
<div class="col-md-4 ms-auto"><button type="submit" name="button1" class="btn btn-outline-info btn-lg value="Button1">Leave a message</ button></div>
<br>
</form>
<?php
if(!array_key_exists('button1', $_POST)) {
return ;
}
?>
and I added right after
if ($this->params->get('show_form') == 1) : ?>
this code:
<div class="card-sm bg-light" >
<div class="card">
<div class="card-body ">
<div class="row">
<div class="col-md-4"><?php echo "Your opinion matters"; ?></div>
</div>
</div>
</div>
<br>
<div class="col-md-4 ms-auto"><button type="submit" name="button1" class="btn btn-outline-info btn-lg value="Button1">Leave a message</ button></div>
<br>
</form>
<?php
if(!array_key_exists('button1', $_POST)) {
return ;
}
?>