如何从谷歌表单网格项获取行信息

时间:2016-07-13 16:14:17

标签: google-apps-script google-form

我创建了一个包含谷歌脚本的表单,现在我想要检索回复。来自google的示例工作正常但我也想要网格项中的行信息。 在information我应该可以使用getRows,但它不起作用。我做错了什么?

<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="15000">
<!-- Indicators -->
<?php

mysql_connect("localhost","twbpla5_eduardo","[2015]Honor");
mysql_select_db("twbpla5_website_dev"); 
$query = mysql_query("SELECT * FROM banner");

?>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<?php
while($row=mysql_fetch_array($query))
{
  echo '<div class="item"><img src="images/banners/'.$row[image].'" alt="'.$row[image].'"></div>';
}
?>
</div>

<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
</a>
</div>

<link rel="stylesheet" type="text/css" href="css/carousel.css" />
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#myCarousel .item').first().addClass('active');
$('#myCarousel').carousel();
});
</script>

1 个答案:

答案 0 :(得分:1)

尝试:

if(items[i].getType() == "GRID") 
    {Logger.log(items[i].asGridItem().getRows());}