Third Party Plugins to CMSimple - how to install, use and create plugins
Moderator: Tata
-
lck
- Posts: 2963
- Joined: Wed Mar 23, 2011 11:43 am
-
Contact:
Post
by lck » Fri Nov 11, 2022 8:08 pm
olape wrote: ↑Fri Nov 11, 2022 1:09 pm
Is there a link where you can look at the site?
Yes, that would be very helpful. At least the source code of the form with the reference number would be interesting.
But I guess your form name is not
myform and that's why the CSS doesn't work. Of course this has to be adjusted here.
Code: Select all
form[name="myform"] table tr:last-of-type {
display: none;
}
or a !important is missing.
Code: Select all
form[name="myform"] table tr:last-of-type {
display: none !important;
}
-
bastingse
- Posts: 308
- Joined: Fri Jun 06, 2008 9:38 pm
- Location: Netherlands
-
Contact:
Post
by bastingse » Sat Nov 12, 2022 10:21 am
Let's see... i created this:
A file named lbhf.inc
Code: Select all
<?php
if (!function_exists('advfrm_custom_field_default')) {
function advfrm_custom_field_default($form_name, $field_name, $opt, $is_resent) {
if ($field_name == 'referentienr') {
if (empty($_POST['advfrm-' . $field_name])) {
return time();
} else {
return $_POST['advfrm-' . $field_name];
}
}
}
}
A file named lbhf.tpl
Code: Select all
<div id="advfrm-lbhf">
<?php Advancedform_focusField('lbhf', 'advfrm-naam') // focus the first field?>
<div class="break">
<div class="label"><label for="advfrm-lbhf-naam">Uw naam <span style="color:red">*</span></label></div>
<div class="field"><?field naam?></div>
</div>
<div class="break">
<div class="label"><label for="advfrm-lbhf-e_mail">E-mail <span style="color:red">*</span></label></div>
<div class="field"><?field e_mail?></div>
</div>
<div class="break">
<div class="label"><label for="advfrm-lbhf-tel_num">Telefoonnummer</label></div>
<div class="field"><?field tel_num?></div>
</div>
<div class="break">
<div class="label">Maak uw keuze <span style="color:red">*</span></div>
<div class="field"><?field keuze?></div>
</div>
<div class="break">
<div class="label"><label for="advfrm-lbhf-naam_vereniging">Evt. naam vereniging</label></div>
<div class="field"><?field naam_vereniging?></div>
</div>
<div class="break">
<div class="label"><label for="advfrm-lbhf-idee">Uw idee <span style="color:red">*</span></label></div>
<div class="field"><?field idee?></div>
</div>
<div class="break">
<div class="label"><label for="advfrm-lbhf-kosten_indicatie">Indien bekend een kostenindicatie</label></div>
<div class="field"><?field kosten_indicatie?></div>
</div>
<div class="break referentienr">
<div class="label"><label for="advfrm-lbhf-referentienr">Referentienummer</label></div>
<div class="field"><?field referentienr?></div>
</div>
<div class="break"></div>
</div>
And a file named lbhf.css in the css directory
Code: Select all
#advfrm-lbhf {}
#advfrm-lbhf div.break {clear: both}
#advfrm-lbhf div.float {float: left; margin-right: 1em}
#advfrm-lbhf div.label {/* float: left; width: 12em; margin-bottom: 0.5em; */}
#advfrm-lbhf div.field { margin-bottom: 0.5em; /* float: left;*/}
#advfrm-ldhf div.break.referentienr {display: none !important;}
/* the individual fields */
#advfrm-lbhf-naam {}
#advfrm-lbhf-e_mail {}
#advfrm-lbhf-tel_num {}
#advfrm-lbhf-keuze {}
#advfrm-lbhf-naam_vereniging {}
#advfrm-lbhf-idee {}
#advfrm-lbhf-kosten_indicatie {}
#advfrm-lbhf-referentienr {}
The last field 'referentienr' is still not hidden
Last edited by
bastingse on Sat Nov 12, 2022 10:52 am, edited 1 time in total.
-
lck
- Posts: 2963
- Joined: Wed Mar 23, 2011 11:43 am
-
Contact:
Post
by lck » Sat Nov 12, 2022 10:44 am
Code: Select all
#advfrm-ldhf div.break.referentienr {display: none !important;}
You have a typo in ldhf. Must be lbhf.
Code: Select all
#advfrm-lbhf div.break.referentienr {display: none !important;}
-
bastingse
- Posts: 308
- Joined: Fri Jun 06, 2008 9:38 pm
- Location: Netherlands
-
Contact:
Post
by bastingse » Sat Nov 12, 2022 10:52 am
Whow guys.... i'm so unbelievable stupid!!!
That was the problem.... that typo!!
My excuses 1000 times!!
It works perfect now!!! Thanks!!!
-
lck
- Posts: 2963
- Joined: Wed Mar 23, 2011 11:43 am
-
Contact:
Post
by lck » Sat Nov 12, 2022 11:08 am
No problem. We are happy with you.