Forum Replies Created
- AuthorPosts
katw
ParticipantThe SLASH at start of $codes line shouldn’t be there so take it out. I didn’t suggest removing a trailing slash, just the one at start of the first line.
Did you see the directory path change in my code?
WP_PLUGIN_DIR not WP_CONTENT_DIR
You could add a debug statement to see what path is being created and then test the path manually to see if you can access the code.txt file from that path.
You might also see from doing this if the text file contains the correct contents. Sometimes when file security is set wrong the contents shows an error message not the file itself which gives you heads-up you need to fix file attributes.
add_filter('quform_element_valid_1_37', function ($valid, $value, $element) { $pathcheck = WP_PLUGIN_DIR . '/surveyhdapg/codes.txt'; echo '<script language="javascript">'; echo 'alert("Path:' . $pathcheck .'")'; echo '</script>'; $codes = file(WP_PLUGIN_DIR . '/surveyhdapg/codes.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!in_array($value, $codes)) { $element->addError('Código no válido'); $valid = false; } return $valid; }, 10, 3);
I assume you have the correct field reference 1_37 too? You will know soon enough if the alert box appears.
katw
Participant@omg thanks.
You can do the style adjustment within Quform or you add the style override within your theme css.
Within Quform:
- EDIT the textarea field you want to adjust.
- Choose STYLES tab. You can play with the preset field size options in “FIELD SIZE” or for more precise control:
- goto bottom CSS STYLES option
- click ADD
- Choose TEXTAREA FIELD from “Selector” popup.
- Type in your CSS. in this case:
height:XXXpx;
or whatever measurement you want EM or REM etc
- Click [save] to close field edit dialog
- Remember to [SAVE] form.
OR
Outside Quform:
Edit your theme CSS and add:
.quform-1 .quform-field-1_28 { height:80px; }
Change
.quform-1
to match your form ID. (1 = first form)
Change the1_28
number to match your textarea field ID number.Hope this has helped a little.
- This reply was modified 6 years, 9 months ago by
katw. Reason: Fixed markup
Attachments:
You must be logged in to view attached files.katw
ParticipantHi @omg
Thought I could help out.
Does your form use one of the Preset Styles or THEMEs ?
If unstyled (no-theme) the form font or typeface comes from your WordPress Theme and its various stylesheets.
Have you been doing customisation with styles in Quform? Check your Global CSS Styles for any mention of font-family etc.
Otherwise:
The quickest way to find out where the style controls are coming from is using the developer tools in your browser (Inspector).
Attachments:
You must be logged in to view attached files.July 25, 2018 at 2:58 am in reply to: Can you detect Admin > Entries-mode v's Email notification mode? #26367katw
ParticipantThank you,
your help was awesome.
Close ticket
katw
ParticipantHi @Icemanmx
Saw your post and thought I could help.
You said your code.txt file is in the plugin folder – yes?
If yes, the code you are using is looking for file in WP Content folder. Also you have a leading slash at start of the line which shouldn’t be there.
Try:
add_filter('quform_element_valid_1_37', function ($valid, $value, $element) { $codes = file(WP_PLUGIN_DIR . '/surveyhdapg/codes.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!in_array($value, $codes)) { $element->addError('Código no válido'); $valid = false; } return $valid; }, 10, 3);
July 24, 2018 at 2:34 pm in reply to: Notification Custom Email – Not pulling from email-content.php #26356katw
ParticipantHi Ally,
any chance you could get back to me on this?
Thanks
katw
ParticipantHi Ally,
I notice the page mentions examples but shows only the table of parameters.
Will you be updating this document?
Thanks
Kat
katw
ParticipantThanks for that, will give it a go.
CLOSE ticket
May 11, 2018 at 4:15 am in reply to: Preventing Submission – spammers trying to sell me viagra #25625katw
ParticipantHi @blackbeard
Try:
.quform { max-width: 100%; width: 600px; margin: 0 auto; }
This class is the outer most wrapper of the form.
katw
ParticipantWas this feature added?
As 2.2.0 doesn’t show this as an option in Entries List or edit view.
Would be great to have.
katw
ParticipantHi @mgoldsm7,
Thought I may be able to give you some ideas to try:
If the form you want completed resides on particular page you could check the URL before you attach the event to “nag them”.
That way you would only run the “exit check” on the page that matters.
var current_url = location.href;
This returns the full url with all parameters, so to focus on the page name you need to isolate the page name from the querystring like so:
var url = location.href; var url_bits = url.split(‘?’); var main_part = url_bits[0];
In your (document).ready function you would get the page name then test if page equalled the page that matters then run/attach the on submit event.
$(document).ready(function() { // INSERT CODE TO GET URL - What page am I on? // INSERT CODE TO TEST IF (PAGE == 'important_form') { $(“#quform-form-146d47”).on(“submit”, function(e) { $(window).off(“beforeunload”); return true; }); // INSERT END IF });
If the page name is known by a number of names (aliases) you would need a list of aliases to test against. Method would work but IF would be checking against an array of names and/or checking query string too.
- This reply was modified 7 years ago by
katw. Reason: fixed typo
May 10, 2018 at 1:40 am in reply to: Can you detect Admin > Entries-mode v's Email notification mode? #25606katw
ParticipantA small request.
Could you in next release add class names to the html lists you auto generate for notifications for multi-select, checkbox and file elements.
I.E Change the getValueHtml() function to add a CLASS name. A different one for files, checkbox and multi-select elements as styling may need to be different.
Using advanced selectors in email html is not possible. The ideal solution is a custom setting where we can define the custom inline style we want attached to the UL and another for the LI elements.
You would then insert a style=”<our code>” to the UL, and the other style code to each LI
Give it thought.
May 10, 2018 at 1:28 am in reply to: Can you detect Admin > Entries-mode v's Email notification mode? #25605katw
ParticipantWhich environmental value would HTML Email notifications use?
- AuthorPosts