Im new in Yii2, And Im try to get the ratio for fields filled by user in signup, what is best way to do that?
Example:
This is field in signup form:
name, email, phone, address
And user fill name, and email only
The result for ratio must be: 50% filled
Note: We have relation fields too.
You can calculate it by using this widgets
https://github.com/aneeshikmat/formCompleteRatio
Good luck
Related
i’ve set up an online form using contact form 7 that posts to my secret postie email address. each email gets collected and listed in draft format for moderation.
the post_type i’m using is one called testimonials that comes with my theme, which doesn’t have a body section as such, instead it has four custom fields – ‘author_name’, ‘author_company’ [not required], ‘author_url’ [also not required] and ‘author_quote’.
what i would like to do is have postie auto-fill the author_name and author_quote fields instead of trying to fill the [non-existent] body, using the your-name and your-message fields in contact form 7. that is, i want the values of the contact form your-name and your-message fields to be injected into the database as the meta_values of the pyre_author_name and pyre_author_quote meta_keys
i hope that makes sense?
i tried tweaking the add_custom_field function in the filterPostie.php file to see if anything worked, but no
function add_custom_field($post) {
if (‘testimonials’ == get_post_type()) {
add_post_meta($post[‘ID’], ‘pyre_author_name’, ‘$your_name’);
add_post_meta($post[‘ID’], ‘pyre_author_quote’, ‘your-message’);
return $your_name;
return your-message;
}
}
can anyone see what i'm doing wrong, or know what i might have to try to achieve what i want?
the site i'm working on is here: https://sistascarpentry.co.uk/testimonials/
thanks in advance
I am creating a report using SSRS which contains pages separated by individual account holders. Each page represents one account and I am using a textbox label in the header to display the name of the account; however, I am having trouble getting the textbox label to show different name as I navigate through pages.
So for example, on page 1 the account label in the header would show Account A, and on page 2 it should show Account B. However, right now it always shows Account A regardless of the page it is on. The expression of the label looks like this : =(Fields!Account_Name.Value)
Do I need to create a grouping or some sort in order to have the account change depending on the grouping of account name? If so how do I go about doing this? Thanks!
You will have to display the group field in the page header.
The expression would be something like this:
=ReportItems!Account_Name.Value
Reference: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1bc58a64-db73-4eda-9f86-21d6f9e23c84/ssrs-to-display-page-header-as-per-the-group?forum=sqlreportingservices
I have an Image, that gives the photographer credit, that I would like to be able show depending on the Photograph. In ACF is there a way to set it up so that when I select a "Choice" field that the photo credit will show depending on the choice? And the Image has to link to the Photographers web site.
Lets take an example. You can have four fields.
Photo (Image field)
Give Credit (True/False field)
Photographer (Text)
Photographer URL (Text)
To make Photographer and Photographer URL field dependent to Give Credit field, you need to enable Conditional Logic and set it to Yes. Under that set Give Credit - is equal to - checked. You can find this option in the bottom when you edit field.
Thank you for your help. I ended up just using a true/false custom field with an if/else statement. Being it was only on one custom post type I just added the php in post type.
<?php if( get_field('image4') ) { echo "Photo's taken by: <a href='http://www.sample.com/'><img src='http://photolinkhere.jpg' /></a>"; } else{} ?>
The following query gives correct results on a continuous form:
SELECT tblDisclosure.DBSInvoice, Sum(tblDisclosure.DBSFee) AS SumOfDBSFee, Count(tblDisclosure.ID) AS CountOfID, Sum([MyFee]+[Other]+[ExternalCheck]) AS Me
FROM tblDisclosure
GROUP BY tblDisclosure.DBSInvoice
HAVING (((tblDisclosure.DBSInvoice) Is Not Null));
On the form footer, I want to sum all DBS Invoices and Me controls, which I have Named 'DBSInv' and 'Me' . I am trying '=Sum([DBSInv])' and '=Sum([Me])' in Text Boxes but I get the result '#Error'.
The problem was because I was trying to use the NAME of the Text box, which I had created for convenience. If I name the texbox as SumOfDBSFee and make the Footer =Sum(SumOfCBSFee), it works.
I have a website with an embedded google map on it, similar to https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete but with our offices displayed.
I'm trying to set up event tracking with google analytics and would like to track users using the map. I would like the label to be the value entered in the search field e.g.
<input type=”submit” onClick=”_gaq.push([‘_trackEvent('Search-form', 'Submit', 'London', 10]);” />
but 'London' = whatever the user has entered.
Is this possible?
Yes it is possible. You just need to add some code to grab the value entered for that particular field and populate that into the label parameter. If your city input field has a specific ID, then you could do something like
_gaq.push(["_trackEvent", "category", "action", $("#city").val(), 10]);