RSFORMS thank you message show submission Id - joomla

In rsforms pro:
$thankYouMessage .= 'The number is inserted';
echo '$submissionId';
I have tried
$thankYouMessage .= 'The number '$submissionId' is inserted';
but it is not working. How do i display the submission id of the form I have submitted?

Related

How to provide whitespace between a displayed Icon and Data in a Datatables Ajax table column field

In one of my controllers, I have an Ajax Datatables process generating a table as my index function. In this process in one of my date columns, I have added logic that displays an icon beside the date if the date is today's date or past date, but if it is a future date then it just displays the date.
$table->editColumn('followup_date', function ($row) {
// check to see if record is todays date or older, if so display Bell icon next to date
$date = Carbon::parse($row->followup_date);
$today = Carbon::now();
if ( $today > $date ) {
return $row->followup_date ? (true ? ' <i class="fas fa-bell-exclamation red"></i>' : '') . $row->followup_date : '';
} else {
return $row->followup_date ? (false ? ' <i class="fas fa-bell-exclamation red"></i>' : '') . $row->followup_date : '';
}
});
This works grand, however, the icon displays in the table column field right beside the date data without a space between. Such as 'IconDate' and I want it displayed as 'Icon Date'. How does one successfully inject a space between the icon and the date in this return statement?
My thought was something to do with '&nbsp' however I have not found a successful way to implement it in the code. I'm sure I am missing something simple but all my attempts at added the space between icon and date have failed.
In response to AndrewJames with regard to what I had tried. I had been thinking that I needed to insert the space between the two elements, icon and date. So I had explored different ways to try and use   in some manner to the lsft of ) and before the $. Such as ) . $row OR ) . $row OR ) . . $row and a bunch of other options.
Based on some of the questions Andrewjames asked me, it got me thinking that rather than add the whitespace between the two elements maybe the answer lay with attaching the whitespace to one of the elements. That seems to the thought I needed. The answer is to add the whitespace inside the ( ) attached to the element:
return $row->followup_date ? (true ? ' <i class="fas fa-bell-exclamation red"></i> ' : '' ) . $row->followup_date : '';
This provides the whitespace between the icon and the date when displayed in the table.

i want to show the phonenum of the user if it is already entered then the it will show the phonenum

hi i am trying to show the phone num of the user if it is already entered then the num will show in the input field
<input type="tel" name="phonenum" id="phonenum" #if(isset($user))
{{$user->Phonenum}}
#endif>
i am trying to show it in this manner it is not working any suggestion ??
how can i show the number of the user if it has already been entered by the user .
here in the user table
$table->integer('Phonenum')->nullable();
the field is set in this manner .any suggestion??

Validation of date input fields in React

i have to date input fields which i defined like this:
const MyDatePicker = ({ input, meta: { touched, error } }) => (
<div>
<DatePicker
{...input} dateFormat="DD-MM-YYYY"
selected={input.value ? moment(input.value, 'DD-MM-YYYY') : null}
/>
{touched && error && <span>{error}</span>}
</div>
);
I use redux form for this. I want to add a validation with the following functionality. When the date in the "Date To Field" is lesser than the date in the "Date From" field a message will be shown that the date to field must me greater that the date from field. As you can see my date format is for example: 06-03-2017. The more "challenging" part is that in another component the date From and date To must have a time space of year. If the time space is more than a year a message should be appeared the the time space must be of a year at max
The synchronous validation function in Redux Form is given all of the form values. It seems like it would be pretty easy to say:
if(values.to.before(values.from) {
errors.from = 'Must be before'
}
Alternatively, if you are doing "field-level" validation, the second parameter to the validate function is all the values of the form.

Magento Add to cart button with predefined quantity

How to Add quantity for this add to cart button code:
onclick="setLocation('
<?php
echo (string)Mage::helper('checkout/cart')->getAddUrl(Mage::getModel('catalog/product')->load($prod->getId()));
?>
')"
Mage_Checkout_Helper_Cart getAddUrl suggests that you can pass through the product as the first parameter, and an $additional array too. This additional array can include qty as a key, with a value.
So, you can call:
$additional = array("qty"=> 3);
echo (string)Mage::helper('checkout/cart')->getAddUrl(Mage::getModel('catalog/product')->load($prod->getId()), $additional);

Get full country name to echo from country_of_manufacture attribute

I'd like to print out the country of origin for a product based on the country_of_manufacture attribute in Magento. When I do the following:
<?php echo $_product->getCountryOfManufacture(); ?>
It will only print out the country code (ex: US or IT) rather than the full country name. How can I get it so that it will display the full country name, the same way I choose it when editing a product?
Try it like this:
<?php echo $_product->getAttributeText('country_of_manufacture');?>

Resources